If a cell contains X Y Z, how do i add days to a date in another cell?!

digbeefeebee

New Member
Joined
Jan 8, 2019
Messages
4
Hi,
I hope you can help me, I am working on an excel sheet just now.

In column G I have X, Y or Z
In column H I have a date
In Column I,I need to work out the due date.

If column G is X or Y then I need to add 21 CALENDAR days to the Date In Column H to get the due date.

If column G is Z then I need to add 20 DAYS to Column H to get the due date

Is their a formula for this?


Thank you
Jodie
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Assuming your data starts in row 2, put this formula in I2: =IF(OR(G2="X",G2="Y"),H2+21,IF(G2="Z",H2+20,""))
Copy the cell formatting from H2 to I2
Drag down as required. If there is no X,Y or Z then it puts a blank value in.
 
Upvote 0

Forum statistics

Threads
1,226,114
Messages
6,189,052
Members
453,522
Latest member
Seeker2025

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