Help with a complex IF Formula

irfananeeza

Active Member
Joined
Feb 15, 2008
Messages
334
Office Version
  1. 2010
Folks,

I have created the following IF formula. Wondering, if there is a way to rewrite the same IF formula in a shorter way or anyother short formula that can accomplish the same task. The reason I am asking I still have to add 6 more conditions in the same manner in this formula. Which If I add will make the formula way tooo long and tedious. I, even, wonder if I can add so many if conditions. Anyway, I just want to brief this formula.
Thanks to everyone in advance.

=IF(W1=0,"balance is zero",IF(AND(W1>0,G1<0),W1/G1,IF(AND(W1>0,J1<0),W1/J1,IF(AND(W1>0,M1<0),W1/M1,IF(AND(W1>0,N1<0),W1/N1,IF(AND(W1>0,O1<0),W1/O1,IF(AND(W1>0,P1<0),W1/P1,"Question")))))))
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Assuming W1 will never be < 0, your AND statements are not needed
Code:
=IF(W1=0,"balance is zero",IF(G1<0,W1/G1,IF(J1<0,W1/J1,IF(M1<0,W1/M1,IF(N1<0),W1/N1,IF(O1<0,W1/O1,IF(P1<0),W1/P1,"Question")))))))

As far as more IF's, unless you have Excel 2007, you are limited to 7 Nested IFs. However, there are some workarounds. See Chip Pearson's Topic Index here
www.cpearson.com

lenze
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
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