IsNumber?

karlruff

Board Regular
Joined
Sep 24, 2003
Messages
91
Hello,
Could anyone recommend a formula for checking if the contents of each of the cells in a range contains a number, and if so, return the sum of those numbers?
Thanks
b
 

Some videos you may like

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

karlruff

Board Regular
Joined
Sep 24, 2003
Messages
91
I should have been more clear. If the formula finds the contents of any cell in the range is NOT a number, I need the formula to return an "N/A".
Thx
b
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Does this work for you (as an array)

=(ISTEXT(Range)=FALSE)*(SUM(Range))

Commit using SHIFT + CTRL + ENTER

Should see {=(ISTEXT....)}

Change range refs to A1:A10 or whatever range you need - would return 0 rather than error.

----------------------------

EDIT:

SORRY... this will work for you but will return DIV/0 as error rather than 0

=SUM(Range)/(ISTEXT(Range)=FALSE)

Again, commit as array
 
Last edited:

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

Are you not wanting to sum if any of them are blank or if any of them contain text?

If text, perhaps:

=IF(COUNTIF(A1:A10,"?*"),"N/A",SUM(A1:A10))

or if either, perhaps:

=IF(COUNT(A1:A10)=ROWS(A1:A10),SUM(A1:A10),"N/A")
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,128,180
Messages
5,629,188
Members
416,370
Latest member
Lgathana

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
Top