Help with multiple if functions in one cell

amlagu

New Member
Joined
Sep 11, 2014
Messages
15
Hi. I was hoping you could help me. This question has multiple layers. I have a spreadsheet where if a date appears in one cell (L6) then I want to subtract I6 from H6, but if no date appears I want to just display H6 value in Q6.

I have used this formula and it works: =IF(ISBLANK(L6), H6, H6-I6)

But if H6 has a value, but N6 doesn't then I want to H6-I6-M6.

This formula also works: =IF(ISBLANK(N6),H6-I6,H6-I6-M6)

But I actually want to merge the formulas together, so if both cells are blank, then Q6 shows the H6 value, but if L6 has a value but N6 doesn't then I want Q6 to subtract I6 from H6, but if both L6 and N6 have a value, then in Q6 I want the answer to the equation H6-I6-M6.

Hope that makes sense.

Many thanks
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Thank you so much. Would you also be able to please help with adding one more if function to the cell, if L6 and N6 have a value but P6 doesn't then I want Q6 to answer the equation H6-I6-M6 but if L6, N6 and P6 all have a value, then in Q6 I want the answer to the equation H6-I6-M6-O6. I am missing something when I tried to work it out myself. Thanks again.
 
Upvote 0
Try this, if not exactly what you need should get you on the road to solving it.

=IF(AND(ISBLANK(L6),ISBLANK(N6)),H6,IF(AND(NOT(ISBLANK(L6)),ISBLANK(N6)),H6-I6,H6-I6-M6))
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,167
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