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...
Chris_Mercer
Jan 11, 2024Copper Contributor
Hi File is here
https://1drv.ms/x/c/5b76311aac56837f/ESAs6Na0iHVIlNvCoJH3deUBNeZT8cnUphKZqHB3DcJgaA?e=BLDFaF
Thanks
Excelonlineadvisor
Jan 11, 2024Iron Contributor
Pls 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)
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)
- Chris_MercerJan 13, 2024Copper Contributor
Hi Thanks for the help - yes that clears the value error when I amend the formula to WORKDAY(AS9,AN9,Table3)... but that adds the number of days to the previous date whereas I need to subtract the dates back from the previous i.e. AO12 subtracts 5 working days from AS12 date to return the earlier date.
Weirdly when I re-entered the original formula into the cells with the minus sign the value error cleared??
Appreciate your help