How do I sum cells and ignore text

bucci35

Active Member
Joined
Jul 6, 2002
Messages
350
Office Version
  1. 365
Platform
  1. Windows
I have cells A1 through A10 which can contain numbers or text. I want to be able to sum this range while always ignoring the ones with text so as to eliminate the error when summing.

Any ideas?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I get value error when their is a non numeric in one of the cells?
 
Upvote 0
Sorry,

I see why. It's because I'm attempting to subrtract and/or multiply cells when some have text in them, then I add this column up.
So, the question now is if one of 2 cells that I am subracting and/or multiplying by a factor contains text, how do I get around it?
 
Upvote 0
Use a formula like

=IF(AND(ISNUMBER(F1),ISNUMBER(G1)),F1*G1,"")

which will leave the result cell blank if either of the values that you are trying to multiply is non-numeric.
 
Upvote 0
Can you post the formula that gives you a #VALUE error....and indicate which cells might contain text?

In general you could probably use a formula like

=IF(ISERR(Your_formula),"",Your_formula)

....although you might be able to simplify that if only certain cells can contain text.

Alternatively you can sum C1:C10, while ignoring errors with

=SUM(SUMIF(C1:C10,{">0","<0"}))
 
Upvote 0
The 2 cells I am calculating are formatted as a date, should I be using some other phrase instead of isnumber?
 
Upvote 0
Dates are simply formatted numbers in Excel so ISNUMBER should work just fine....although you might like to describe exactly what you are tring to achieve and what formula you are currently using
 
Upvote 0
I don't know if this is relevant to your problem, but I frequently find text substututed for numbers and the easiest way to avoid the problem is to use the SUM function as it ignores text.

Instead of =A1*B1, use =sum(A1)*sum(B1). This will give you a zero in the event that either cell contains text.
 
Upvote 0

Forum statistics

Threads
1,214,430
Messages
6,119,438
Members
448,897
Latest member
dukenia71

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