Forum Discussion
Chris_Mercer
Jan 11, 2024Copper Contributor
Value Error when calculating dates, IF Function & WORKDAY Function
Hi - I'm getting a value error returned when trying to calculate dates in a formula and am looking for help.
I'm looking to calculate a series of procurement dates (shipping, manufacture etc.) which subtract duration days from previously calculated days. This depends on whether the materials are being purchased locally or internationally thus working with different holiday calendars (Tables 3&4 on another sheet).
The formula seems to work for the first column (AS) which gets the date from a VLOOKUP formula (in AV) but then returns an error in subsequent rows (AO,AK) when International is selected in column AH??
Thanks
4 Replies
- ExcelonlineadvisorIron ContributorCan you share a link to access the file ?
- Chris_MercerCopper Contributor
Hi File is here
https://1drv.ms/x/c/5b76311aac56837f/ESAs6Na0iHVIlNvCoJH3deUBNeZT8cnUphKZqHB3DcJgaA?e=BLDFaF
Thanks
- ExcelonlineadvisorIron ContributorPls check the formula at AO9
Current Formula = =IF(AH9="International",WORKDAY(AS9-AN9,Table3),WORKDAY(AS9,-AN9,Table4))
Correction :- Instead of WORKDAY(AS9-AN9,Table3) , it should be WORKDAY(AS9,AN9,Table3)