SUM only numbers in a cell that also contains text.

Palacemad

New Member
Joined
May 19, 2019
Messages
31
Hi, I'm sure this will be fairly straightforward for someone here...

I have a group of cells that I want adding together, they are cells G65, K65, O65 and S65.

Each one of these cells contains both text and numbers and I only want to add the number part of the cell. They all contain the same formatting, they say the word Achieved, have one space and then the number value.

I have looked at using SUMIF and ISNUMBER but all to no avail.

I would be very grateful if someone can point me in the right direction!

Thank you
 

Finalfight40

Active Member
Joined
Apr 24, 2018
Messages
257
Office Version
365
Platform
Windows
As the cells are all going to be formatted the same, you can try something like the below:

=SUM(RIGHT(G65,LEN(G65)-SEARCH(" ",G65)),RIGHT(K65,LEN(K65)-SEARCH(" ",K65)), RIGHT(O65,LEN(O65)-SEARCH(" ",O65)), RIGHT(S65,LEN(S65)-SEARCH(" ",S65)))
 

Finalfight40

Active Member
Joined
Apr 24, 2018
Messages
257
Office Version
365
Platform
Windows
Or:

=SUM(SUBSTITUTE(G65, "Achieved", ""), SUBSTITUTE(K65, "Achieved", ""), SUBSTITUTE(O65, "Achieved", ""), SUBSTITUTE(S65, "Achieved", ""))
 

Palacemad

New Member
Joined
May 19, 2019
Messages
31
Thank you! Th efforts option definitely works. Will try the second suggestion too as that appears to be more straightforward to understand what is going on.
 

Finalfight40

Active Member
Joined
Apr 24, 2018
Messages
257
Office Version
365
Platform
Windows
Happy it works for you.

The first option is just looking to the right of the space of each cell since you have a space before each number and the second option is just replacing the "Achieved" with nothing which leaves just the number.

Added the second option since i thought it looks a lot easier to change if needed.
 

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
7,158
Office Version
2019
Platform
Windows
How about

=SUMPRODUCT(--MID(CHOOSE({1,2,3,4},G65,K65,O65,S65),10,100))
 

Forum statistics

Threads
1,082,615
Messages
5,366,616
Members
400,906
Latest member
incanus

Some videos you may like

This Week's Hot Topics

Top