# Nested IF function to ignore blank cells

#### Ralley

##### New Member
Hi,

I am currently using the following formula, but due to the size of the spreadsheet now I would to drag the formula down the page without it populating the rows that are blank. Please can anyone help?

=IF(O10="",X10,IF(X10="",O10+Q10+S10))

Cheers

Richard

### Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Use a filter to hide the blank rows, when you drag down only visible rows are populated.

Thanks for the response, but I would like the formula in the blanks cells for future input I just don't want anything displayed in it i.e. £ - as I am using the accountancy setting.

Try

=IF(count(O10,Q10,S10,X10),IF(O10="",X10,IF(X10="",O10+Q10+S10)),"")

That will only return a result if at least one of those cells holds a number.

Worked a treat, don't really understand how it made it work, but thanks very much for your assistance.

Worked a treat, don't really understand how it made it work, but thanks very much for your assistance.

I need an alternative formula if possible as this disrupts other formulas that read this cell.

Any suggestions?

What do you want displayed in the cells for the blank rows?

Please give an example formula that is being disrupted.

Also looking again at your original formula, it appears that of the cells X10 and O10, 1 should hold a value (numeric) and the other should be empty, but what should be shown in the case that both are blank, or both hold a value?

I'm struggling to explain, I've tried posting a screen shot, but it doesn't seem to work.

Having said that I may have found the source of my disruption. I have a formula;

=IF(A10,O10+Q10+S10+U10+Z10,"")

The issue is A10 contains text, is there a command I can enter to complete the formula? Again the formula needs to be dragged so I don't want it to calculate when there are blank cells in column A.

The text in Column A is a ref no, so changes on each entry.

Does this make sense?

I'm struggling to explain, I've tried posting a screen shot, but it doesn't seem to work.

Having said that I may have found the source of my disruption. I have a formula;

=IF(A10,O10+Q10+S10+U10+Z10,"")

The issue is A10 contains text, is there a command I can enter to complete the formula? Again the formula needs to be dragged so I don't want it to calculate when there are blank cells in column A.

The text in Column A is a ref no, so changes on each entry.

Does this make sense?
=IF(A10<>"",O10+Q10+S10+U10+Z10,"")

HTH

I think thats what you mean, can you clarify further if example above doesnt give you what you need.

Replies
18
Views
702
Replies
12
Views
473
Replies
6
Views
250
Replies
8
Views
237
Replies
8
Views
186

1,203,145
Messages
6,053,746
Members
444,681
Latest member

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