Sum only data with numbers

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Using Excel 2000

Hi,

I need to sum only data's values are in column C without "X" only numbers.

Example data.


Book1
ABCD
1
2
3
4DataSum Only
5DataNumbers
6X|2|1
72|1|25
81|X|1
91|1|24
101|1|X
112|1|X
122|2|26
13X|1|2
14X|X|X
15X|X|2
161|1|13
171|X|2
182|X|1
192|X|2
202|2|26
212|1|X
222|1|25
232|X|2
241|X|X
25
Sheet1


Thank you in advance

Regards,
Kishan
 
Last edited:

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Something like:

=sumproduct(--iserror(search("X",c6:c24)),d6:d24)

will work on your sample. Or are you trying to select strings with no alpha characters at all?
 
Last edited:
Upvote 0
Hi,

I "think" OP means per line:


Book1
CD
4DataSum Only
5DataNumbers
6X|2|1 
72|1|25
81|X|1
91|1|24
101|1|X
112|1|X
122|2|26
13X|1|2
14X|X|X
15X|X|2
161|1|13
171|X|2
182|X|1
192|X|2
202|2|26
212|1|X
222|1|25
232|X|2
241|X|X
Sheet72
Cell Formulas
RangeFormula
D6=IFERROR(SUM(LEFT(C6,1),MID(C6,3,1),RIGHT(C6,1)),"")


Formula copied down.
 
Upvote 0
Hi,

I "think" OP means per line:

Sheet72


Worksheet Formulas
Cell
Formula
D6
=IFERROR(SUM(LEFT(C6,1),MID(C6,3,1),RIGHT(C6,1)),"")

<tbody>
</tbody>

<tbody>
</tbody>



Formula copied down.

Hi, jtakw, i am getting result #¿NAME?

Regards,
Kishan
 
Upvote 0
Worksheet Formulas
CellFormula
D6=IFERROR(SUM(LEFT(C6,1),MID(C6,3,1),RIGHT(C6,1)),"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
Why use the SUM function?

=IFERROR(LEFT(C6)+MID(C6,3,1)+RIGHT(C6),"")

Although if you did want to use the SUM function, maybe write it this way...

=IFERROR(SUM(0+MID(C6,{1,3,5},1)),"")
 
Last edited:
Upvote 0
Why use the SUM function?

=IFERROR(LEFT(C6)+MID(C6,3,1)+RIGHT(C6),"")

Although if you did want to use the SUM function, maybe write it this way...

=IFERROR(SUM(0+MID(C6,{1,3,5},1)),"")
Hi, Rick, unfortunately I am getting same result #¿NAME? I don't know what I am doing wrong?


Regards,
Kishan

 
Upvote 0
Hi, Rick, unfortunately I am getting same result #¿NAME? I don't know what I am doing wrong?
I forgot, you are using XL2000 and IFERROR does not exist in your version of Excel. Give this formula a try instead...

=IF(ISERROR(SUM(0+MID(C6,{1,3,5},1))),"",SUM(0+MID(C6,{1,3,5},1)))
 
Upvote 0
I forgot, you are using XL2000 and IFERROR does not exist in your version of Excel. Give this formula a try instead...

=IF(ISERROR(SUM(0+MID(C6,{1,3,5},1))),"",SUM(0+MID(C6,{1,3,5},1)))
Rick, Spot on it is resulting perfect!!

Thank you very much for you kind help and time!!

Kind Regards,
Kishan :)
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,391
Members
448,957
Latest member
Hat4Life

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