Help With Formula Please

meppwc

Well-known Member
Joined
May 16, 2003
Messages
636
Office Version
  1. 365
Platform
  1. Windows
I have a formula that works fine now, but I want to add an additional condition.

The existing formula (below) resides in cell P2. It looks to see if cell E2 is blank. If E2 is blank then P2 is blank, if E2 is not blank, then P2 is populated with the result of N2-M2. Note, the values in N2 and M2 are dates using the format of 1/1/2014.

=IF(E2="","",N2-M2)

I want add another condition to this formula. Here is the overall logic I need.

If E2 is blank, then return blank
If E2 is not blank and J2 is blank, then perform N2-M2
If E2 is not blank and J2 is not blank, then perform M2-J2 (note that J2 is also a date in the format of 1/1/2014)
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,226,719
Messages
6,192,666
Members
453,743
Latest member
ntguy

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