Aug 26 2023 12:06 PM
Hi all, in the worksheet attached I enter the person's First Work Day (FWD) in cell E5. In F5 it automatically adds 14 days. In cell J5, if they say Yes to extending I want the formula in F5 to add 7 days to it and if J5 is blank or says no i want the formula to stay at 14 days in F5. i also want it to show blank if nothing is entered into cell E5.
Thank you for any and all help
Aug 26 2023 12:24 PM
SolutionUse
=IF(E5="","",E5+13+7*(J5="YES"))
By the way, shouldn't it be
=IF(E5="","",E5+14+7*(J5="YES"))
Aug 26 2023 12:41 PM
Aug 26 2023 12:55 PM
J5="YES" returns TRUE if J5 contains YES, FALSE if not.
In number calculations, Excel treats TRUE as 1 and FALSE as 0.
* is the multiplication operator: 2*3 = 6.
So 7*(J5="YES") is 7*1 = 7 if J5 is YES, and 7*0 = 0 if not.
Aug 26 2023 03:47 PM
ahhh see that's what I thought it meant but now makes a lot more sense the way you explained it. Thank you again Hans. Much appreciated.
Aug 26 2023 12:24 PM
SolutionUse
=IF(E5="","",E5+13+7*(J5="YES"))
By the way, shouldn't it be
=IF(E5="","",E5+14+7*(J5="YES"))