# If statements

#### mcdonnella

##### New Member
I need help sorting out an if statement to work out the below
=IF(C27=0,0,SUM(H27/(C27-I27-S27-T27)))

the problem I have is that when h27=0 c27=1 i27=1 s27=0 t27=0 the formula comes back as an error
if I do the below formula then it shows as 0% which is what I want.
=IF(ISERROR(SUM(H28/(C28-I28-S28-T28))),0,SUM(H28/(C28-I28-S28-T28))*IF(C28=0,0,SUM(H28/(C28-I28-S28-T28))))

But when I try the second formula on a selection where the below are the values then it comes back as 72% when on the original formula says it should be 84.8%
h27=28 c27=33 i27=0 s27=0 s27=0
any help would be much appreciated

### Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Wouldn't...

IF(C27-I27-S27-T27,H27/(C27-I27-S27-T27),0)

suffice?

Replies
4
Views
169
Replies
5
Views
214
Replies
5
Views
263
Replies
8
Views
117
Replies
5
Views
196

1,203,530
Messages
6,055,936
Members
444,837
Latest member
TheBams

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

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