Hi all,
I'm working on iterative macro which will pick previous working day based on excluded range.
I have prepared list of weekend/holidays and joined it against full calendar which results in days excluded (weekends/holidays) from from further calculations and those which should be considered (working days).
The macro needs to take input date (which is the weekend/holiday) and pick previous working day.
For example input is 2021-08-30 macro needs to output 2021-08-27
I came up with macro which lookups picked date and subtracts iteration number from created record id which should in the end result in picking date which matches the filter [day] = 'in'
for some reason I'm not able to make it work...
Can somebody point me the right direction where I'm making mistake??
Solved! Go to Solution.
@michalk36
Can you calcute the DateDiff between your input and the excluded dates, the one has miminum different should be the closest working day.
If you can share your workflow, I can take a look and see if I can help.
Hi @Qiu
thanks for quick answer, I need specifically pick the date so diff wouldn't do much here.
Please check the attached macro
@michalk36
here is my try.
and I dont quite get it since you mentioned you use iteration.
It is more like a batch macro to me.
@Qiu thanks a lot! I'll take a look and give a shout but it looks very promising!!