![]() If nothing matches, the weekday must be 6, so it's Saturday. THEN it works its way down the list of possible matches, with the result for each one in case of a match. So the first part of the statement looks at the date in the date field, calculates its weekday value. The WEEKDAY() function returns 0 for Sunday, 6 for Saturday, etc. a 'comparand' = some dynamic value, typically a field.Can't do that with SWITCH().īut when you *can* use SWITCH, it's brilliant. Notice that each of the tests is quite different from the others. It's trying to figure out how you would address somebody. ![]() For example, this is a reasonable nested IF statement that could NOT be formatted with SWITCH(): IF( NameLast = "Jones", "Jonesy", SWITCH() is an alternative to nested IF statements. The interesting function in there is SWITCH(). It says if the month is November or May, then add (well, subtract) about 70 days (based on whether resulting date falls on a weekend or a weekday) OTHERWISE, add (well, subtract) 56 days (based on whether the resulting date falls on a weekend or a weekday). And use a proper text editor like Sublime Text or BBEdit so you can make sure your parentheses are balanced.īasically it's an IF() statement. I find it helpful sometimes to build formulas using several different fields, so I can work on smaller bits. Look up each of the functions in your formula, understand what it does. I urge you to spend some time with the Airtable Formula Field Reference. And you're right: It makes it a lot easier to see what the heck is going on. I’m looking to create a template as I will have 4 similar events each year, so it’d be helpful to be able to put the event date and those tasks will automatically fill in their start date.To keep formatting in things like code or formulas, enclose the code or the formula in code block formatting. Is there a formula that I can use in the formula column that will put a correct date in the formula field based on whether the task is a months, weeks or days task? ![]() 4) and for the weeks or days tasks I have it listed with # Weeks (IE 2 Weeks, 2 Days). In the column - right now- I have a whole number if it’s for months (ie. Project Start (Months/Weeks/Days Out) is the column that has the # of Months/Weeks/Days out we need to start working on the task. I’m using this formula in the column (the DATE and Project Start are the columns I’m having it pull data from): DATEADD(Date,-,‘months’)ĭate is pulling from the Date column that i have the first day of the event in. those that needed to be start 2 weeks out, etc. I had to go in each cell to change the formula for the specific task for those that were 1+ months out vs. In my google form/excel sheet I have formulas created so that all I have to do is put in the first day of the actual event into a column, and then another column has the # of months, days or weeks out that we need to start working on that particular task for the event. I’m putting together a checklist for a large event that has due dates- start and end dates included in the table. I’m a complete newb to airtable, so I’m still learning the intricacies to see if it’s something I can use in my role. I know Airtable is not a “spreadsheet” and that typically you cannot use different formulas per row/cell because of the database situation. ![]() ![]() I’m trying to see if there’s a way I can do this. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |