Selective sum of numbers in a string

rahulajmera

New Member
Joined
Jul 30, 2018
Messages
7
Hello,

I need some help in selectively summing of numbers in a string cell in MS Excel.

For Eg:
If the string is "The House located at 7th Ave, New York, NY 10036, USA has the following dimensions: Carpet Area of 50 sqm or 550 sqft, Balcony Area of 10 sqm or 110 sqft, Terrace Area of 20 sqm or 220 sqft"

I want to selectively sum all the numbers that precede "sqm"
That means I want the SUM = 50 + 10 + 20 = 80.
How can we do that in excel?

I have an excel containing hundreds of such string cells and its manually too cumbersome to sum.
 
Yes.

The string looks like:

The House located at 7th Ave, New York, NY 10036, USA has the following dimensions: Carpet Area of 50 चौ.मी. or 550 sqft, Balcony Area of 10 चौ.मी. or 110 sqft, Terrace Area of 20 चौ.मी. or 220 sqft.

<tbody>
</tbody>
If, in "चौ.मी.", those "dots" are both same as "decimal points", then try
Code:
=StrSum(A2;"चौमी")
Bye
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If, in "चौ.मी.", those "dots" are both same as "decimal points", then try
Code:
=StrSum(A2;"चौमी")
Bye

Thank you very much Anthony & Peter.
I have manually found & replaced "चौ.मी." with sqm and it should now do fine.

I am facing a much worse problem now.
My excel is crashing whenever I open the VBA editor.
Any idea how to solve that?
 
Upvote 0

Forum statistics

Threads
1,224,766
Messages
6,180,846
Members
453,001
Latest member
coulombevin

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