Help

IF formula to return # of hours only if month falls within a date range

Topic Labels: Dates & Timezones Formulas
Solved
Jump to Solution
1281 2
cancel
Showing results for 
Search instead for 
Did you mean: 
RobinJ
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi-  I'm a pretty new Airtable user, and have been trying to find solutions via the community posts, but haven't seen anything exactly addressing what I'm attempting to do.

I am trying to populate a field with a number of hours to be worked, only if the month for that work falls within a date range.  In Excel, I was able to make this formula work:  =IF(Column's Month<=Completion Date,Average Monthly Software Hours,0)-IF(Start Date>=Column's Month,Average Monthly Software Hours,0)

I tried to replicate the formula in Airtable that I successfully did in Excel, but it isn't returning the same values.

I've attached a screenshot of the base as well as the formula I tried.  It feels like there's something wrong with how I'm handling the Column's Month formatting, but I can't figure out what...

Many thanks in advance!

-Robin

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

Hi @RobinJ,
Welcome to Airtable Community.

Excel and Airtable formulas are different.
It is recommended to read the reference once.
Formula Field Reference - Overview | Airtable Support

Date values must be enclosed in quotation marks, like strings.
Also a dedicated function is provided for date/time comparisons.

See Solution in Thread

2 Replies 2
Sho
11 - Venus
11 - Venus

Hi @RobinJ,
Welcome to Airtable Community.

Excel and Airtable formulas are different.
It is recommended to read the reference once.
Formula Field Reference - Overview | Airtable Support

Date values must be enclosed in quotation marks, like strings.
Also a dedicated function is provided for date/time comparisons.

RobinJ
5 - Automation Enthusiast
5 - Automation Enthusiast

The quotes!!! That's all I needed to make it work.  Thank you so much!