Adding a date based on another cell value

Skyhaze001

New Member
Joined
Dec 7, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I have a spreadsheet that tracks internal quality issues with the following key cells:

Column A - date identified
Column G - Critical/Major/Minor
Column J - target close out date

Is it possible to auto-populate J with a date depending on the option selected in G? For example the target close out for a critical issue is 7 days after being identified so J should be A+7 days. Major should be A+14 days and minor should be A+30 days
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You could try:
=IF(G16="Critical",A16+7,IF(G16="Major",A16+14,IF(G16="Minor",A16+30)))
 
Upvote 0
If nothing has been entered in Column G, you could use this formula to keep things looking clean:
=IF(IF(G16="Critical",A16+7,IF(G16="Major",A16+14,IF(G16="Minor",A16+30)))=FALSE,"",IF(G16="Critical",A16+7,IF(G16="Major",A16+14,IF(G16="Minor",A16+30))))
 
Upvote 0
Hi Skyehaze001,

This should do what you ask.

Skyehaze001.xlsx
AGJ
1Date IdentifiedCritical /Major /MinorTarget Closeout Date
201-Jan-21Critical08-Jan-21
307-Feb-21Major21-Feb-21
416-Mar-21Minor15-Apr-21
522-Apr-21Critical29-Apr-21
629-May-21Major12-Jun-21
705-Jul-21Minor04-Aug-21
811-Aug-21Critical18-Aug-21
917-Sep-21Major01-Oct-21
1017-Sep-21Minor17-Oct-21
11 
Sheet1
Cell Formulas
RangeFormula
J2:J11J2=IFERROR(A2+CHOOSE(MATCH(G2,{"Critical","Major","Minor"},0),7,14,30),"")
 
Upvote 0
Another option
Excel Formula:
=IF(G2="","",A2+(IF(G2="Critical",7,IF(G2="Major",14,30))))
 
Upvote 0
Hi Skyehaze001,

This should do what you ask.

Skyehaze001.xlsx
AGJ
1Date IdentifiedCritical /Major /MinorTarget Closeout Date
201-Jan-21Critical08-Jan-21
307-Feb-21Major21-Feb-21
416-Mar-21Minor15-Apr-21
522-Apr-21Critical29-Apr-21
629-May-21Major12-Jun-21
705-Jul-21Minor04-Aug-21
811-Aug-21Critical18-Aug-21
917-Sep-21Major01-Oct-21
1017-Sep-21Minor17-Oct-21
11 
Sheet1
Cell Formulas
RangeFormula
J2:J11J2=IFERROR(A2+CHOOSE(MATCH(G2,{"Critical","Major","Minor"},0),7,14,30),"")
Oh, I like that CHOOSE/MATCH combination!
 
Upvote 0
Thank you all! For some reason most of them just left the cells blank even after I updated the cell reference to the correct row but one of them did work.
 
Upvote 0
Thank you all! For some reason most of them just left the cells blank even after I updated the cell reference to the correct row but one of them did work.
You're welcome.
For my formula if the date is not a real date or the column G does not contain the text Critical, Major or Minor then it will return a blank. If you want to provide direction on what to do in those cases then we can cater for them.
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,260
Members
449,075
Latest member
staticfluids

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