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

srizki

Well-known Member
Joined
Jan 14, 2003
Messages
1,831
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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
=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,213,529
Messages
6,114,155
Members
448,554
Latest member
Gleisner2

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