Calculate a Sum of all those cells that also contain some text strings

rajtak

Board Regular
Joined
Feb 23, 2009
Messages
74
Hi,

I want to calculate a Sum/Total of all those cells that also contain some text strings For example:

Cell A1 has
"ABC-2"

Cell B1 has
"DEF-3"

Cell C1 has
"XYZ-5"

So the total would be 10

But as this an example, it is pretty easy to calculate this manually but i have a long list of alphanumeric values. The good part is, these numbers are separated by a hyphen (-).

I need a excel formula/function to do this calculation. Please help me out.:)
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hi,

I want to calculate a Sum/Total of all those cells that also contain some text strings For example:

Cell A1 has
"ABC-2"

Cell B1 has
"DEF-3"

Cell C1 has
"XYZ-5"

So the total would be 10

But as this an example, it is pretty easy to calculate this manually but i have a long list of alphanumeric values. The good part is, these numbers are separated by a hyphen (-).

I need a excel formula/function to do this calculation. Please help me out.:)

Hi,

If your values are same as "ABC-2" then you can use text to columns and sum those.

Arun C M
 
Upvote 0
Hi,

Thanks for your suggestion, but i don't want this to be separated in other columns.
 
Upvote 0
Hi,

Thanks for your suggestion, but i don't want this to be separated in other columns.

Hi,

If your values are keep on updating then you can use this forula on next column and make as sum
=RIGHT(J16,FIND("-",J16,1)-3)

Arun C M
 
Upvote 0
Given your example data, this formula will sum the numeric values:
Code:
=SUMPRODUCT(--RIGHT(A1:C1,LEN(A1:C1)-SEARCH("-",A1:C1)))
It assumes that all of the referenced cells contain a hyphen and that the character text to the right of the hyphen can be coerced into a number.

Hope that helps...
 
Upvote 0
Here's another way...

=SUMPRODUCT(REPLACE(A1:C1,1,FIND("-",A1:C1),"")+0)

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,195
Members
449,072
Latest member
DW Draft

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