Large If then to add days to a date

RayKIII

New Member
Joined
Feb 6, 2014
Messages
37
I am working on a large if-then statement that I am unsure of how to get it to add days to a date. Field H13 will have a number in it. Depending on that number I need to add weeks (days) to the date in cell K13 and output that new date into L13. I have tried both formulas below but with a date of 1/1/2020 in K13 and any number in H13 it is giving me a date of 1/0/1900 in L13. I have formatted both cells to be a date (*3/14/2012). Any assistance is appreciated.



=IF(AND(H13>=60, H13<=300), L13=K13+14, IF(AND(H13>=360, H13<=900), L13=K13+21, IF(AND(H13>=960, H13<=1500), L13=K13+28, IF(AND(H13>=1560, H13<=2400), L13=K13+35, IF(AND(H13>=2460, H13<=4800), L13=K13+42, IF(AND(H13>=4860, H13<=6000), L13=K13+49, IF((H13>=6060), L13=K13+56,"")))))))

=DATEDIF(AND(H13>=60, H13<=300), L13=K13+14, DATEDIF(AND(H13>=360, H13<=900), L13=K13+21, DATEDIF(AND(H13>=960, H13<=1500), L13=K13+28, DATEDIF(AND(H13>=1560, H13<=2400), L13=K13+35, DATEDIF(AND(H13>=2460, H13<=4800), L13=K13+42, DATEDIF(AND(H13>=4860, H13<=6000), L13=K13+49, DATEDIF((H13>=6060), L13=K13+56,"")))))))
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,629
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top