Skip to main content

Using variable in WORKDAY_DIFF holidays

  • March 8, 2021
  • 1 reply
  • 2 views

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?

1 reply

ScottWorld
Forum|alt.badge.img+20
  • Brainy
  • 8735 replies
  • March 8, 2021

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.


Reply