Help

Re: Using variable in WORKDAY_DIFF holidays

1376 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Scott_Cytacki
4 - Data Explorer
4 - Data Explorer

I sent this as a feature request to Airtable support, but I thought I’d post here too. Perhaps there are other workarounds.

The workday_diff function doesn’t handle a blank value for the “holidays” argument. Currently a blank value causes an “#ERROR

Use case:
I’m using the workday_diff function to calculate my working days in a month. Here is a screenshot of a simple example of this:
workday-diff-airtable
Since not all months have days off, the function returns an error for those months.
My work around is to wrap the WORKDAY_DIFF in a IF:

IF({Days Off}, WORKDAY_DIFF(Start, End, {Days Off}), WORKDAY_DIFF(Start, End))

It would be best if the function just handled a blank holidays argument itself. Perhaps someone has found a better solution than the IF wrapper?

1 Reply 1

Yes, that function does handle blank arguments. Your formula should work. It works for me! I would make sure that you don’t have blank spaces hidden in those records that appear blank.