I want to use if statement

Firelyy

New Member
Joined
Mar 30, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I would like to create a if statement that states If cell g4 states yes then add 3 months to the date in E4.

Thanks so much
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
=IF( G4="yes", DATE(YEAR(E4),MONTH(E4)+3,DAY(E4)),"")


Book2
ABCDEFGH
1
2
3
43/30/24yes6/30/24
Sheet1
Cell Formulas
RangeFormula
H4H4=IF( G4="yes", DATE(YEAR(E4),MONTH(E4)+3,DAY(E4)),"")
 
Upvote 0
Welcome to the MrExcel board!

Could this be what you mean?
Col H does not use IF so I have included col I even though that formula is a bit longer.

24 03 30.xlsm
EFGHI
1
2
3
415/02/2024Yes15/05/202415/05/2024
515/02/2024No15/02/202415/02/2024
Firelyy
Cell Formulas
RangeFormula
H4:H5H4=EDATE(E4,3*(G4="Yes"))
I4:I5I4=EDATE(E4,IF(G4="Yes",3,0))
 
Upvote 0
Welcome to the MrExcel board!

Could this be what you mean?
Col H does not use IF so I have included col I even though that formula is a bit longer.

24 03 30.xlsm
EFGHI
1
2
3
415/02/2024Yes15/05/202415/05/2024
515/02/2024No15/02/202415/02/2024
Firelyy
Cell Formulas
RangeFormula
H4:H5H4=EDATE(E4,3*(G4="Yes"))
I4:I5I4=EDATE(E4,IF(G4="Yes",3,0))
Thats exactly what I need but how do I then say if it says no to leave it blank? or say not needed
 
Upvote 0

Forum statistics

Threads
1,215,206
Messages
6,123,636
Members
449,109
Latest member
Sebas8956

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