# Help with a complex IF Formula

#### irfananeeza

##### Active Member
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.

=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

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

#### lenze

##### Legend
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

Replies
6
Views
309
Replies
3
Views
169
Replies
5
Views
886
Replies
0
Views
704
Replies
0
Views
425

1,191,165
Messages
5,985,034
Members
439,935
Latest member
Monty238

### 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.

### Which adblocker are you using?

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

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