# Hiding cells with a formula

##### Board Regular
I have a spreadsheet template with a cell that works out an average score, as the cells above it are empty the cell with the formula has four # in it. How can I hide these four # until the cells above have a value in them? (I want these ones to remain blank and not have a 0 in them).

### Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a \$25,000 loan, 5% annual interest, 60 month loan.

#### Jonmo1

##### MrExcel MVP
You could use an IF to see if the range is empty...
If I understand right, if ALL the cells in the Average range are empty, you want the formula to return a blank "", But if at least 1 cell in the range has a number in it, then give the average, right?

=IF(COUNT(A1:A10)=0,"",AVERAGE(A1:A10))

Hope this helps..

##### Board Regular
Thanks, that was exactly what I was looking for!

Replies
1
Views
165
Replies
5
Views
162
Replies
3
Views
394
Replies
0
Views
294
Replies
8
Views
386

1,191,034
Messages
5,984,261
Members
439,881
Latest member
Amitoj95

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