using an argument of "not equal" to an error

snipescc

Board Regular
Joined
Aug 29, 2010
Messages
136
Office Version
  1. 365
Platform
  1. Windows
Hi folks. I have a spreadsheet that has lots of #ref! errors. They are there because I put formulas into cells before there is data to fill them. The data will be put there later by a macro. So I can't eliminate the errors. However, I need to find the average of numbers in non-adjacent cells, excluding any cell with a #ref! error. I've had trouble writing any formula that contains <>#ref! or something similar. Is there a trick to excluding cells with errors in them? With some things I've seen quotes around both the '<>' and the '#ref!', but while it seems to work when I copy someone else's formula from the web, I have had no luck writing it into formulas myself. Any tips?
 
Hi folks. I have a spreadsheet that has lots of #ref! errors. They are there because I put formulas into cells before there is data to fill them. The data will be put there later by a macro. So I can't eliminate the errors. However, I need to find the average of numbers in non-adjacent cells, excluding any cell with a #ref! error. I've had trouble writing any formula that contains <>#ref! or something similar. Is there a trick to excluding cells with errors in them? With some things I've seen quotes around both the '<>' and the '#ref!', but while it seems to work when I copy someone else's formula from the web, I have had no luck writing it into formulas myself. Any tips?

When doing numeric processing on error-ridden ranges...

Control+shift+enter (CSE), not just enter:

=AVERAGE(IF(ISNUMBER(Range),Range)

Such would admit other stats like SUM, MAX, MIN, etc.

For SUM, non-CSE aproaches would be:

=SUMIF(Range,"<"&9.99E+307)

=SUM(SUMIF(Range,{"<0",">0"}))

The foregoing avoids all errors, not a specific type alone.
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,225,142
Messages
6,183,125
Members
453,148
Latest member
yevhen

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