Using variable in WORKDAY_DIFF holidays

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:


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?

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.

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.