=if(h9=13500100,eomonth($o$8,-2)

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,844
Office Version
  1. 365
Platform
  1. Windows
I have, =IF(G9<>"",EOMONTH($O$8,-1),"") - In column, “M”, I want to add in this formula that if corresponding cell in column, “H”, houses, “13500100”, it should go back to two months.
For example, if I type 03/15/2018 in “O8” it should get 01/31/2018, and not 02/28/2018 as it is now.

Thankse
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
=IF(G9 = "", "", EOMONTH($O$8, if(H9 = "13500100", -2, -1)))
 
Last edited:
Upvote 0
Thank you but that does not work.
 
Last edited:
Upvote 0
Can't you just use an embedded if statement?

Code:
=IF(G9<>"",(IF(H9=13500100,(EOMONTH($O$8,-2)),(EOMONTH($O$8,-1)))),"")
 
Upvote 0
shg,

I tried your formula again and it worked, I removed quotes from "13500100", as this is number, not text.

Thanks again,

Best regards,
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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