Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Sum a range of cells which include concatenated values

Posted on 2014-12-30
2
Medium Priority
?
77 Views
Last Modified: 2014-12-31
I have a vertical range of values.  Each cell concatenates a number and a string.   For example (=C2&C3)  where C2 = 30 and C3 = SomeText.  The result value of the cell would be 30SomeText.

I realize that the concatenate formula turns this into a string and it is no longer a number that cam be calculated.  But I am wondering if there is some way around this.  I want to look at the range and add all the numbers that have the same text.

For example, if this was my range of cells.
80SomeText2
10SomeText
30SomeText
20SomeText2

I want to look at that range, find the "SomeText2" values, and add the numbers which in this case would result in a 100.

Any thoughts?
0
Comment
Question by:Shaye Larsen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40525133
It's possible to do it on one array formula. But it's much more auditable to separate it back out.

In your example, the numbers are all two digit. So you can do

=value(left(c1,2))

And then Sumifs them.
0
 
LVL 23

Accepted Solution

by:
Ejgil Hedegaard earned 2000 total points
ID: 40525324
Here is an array formula for a variable number of digits.
Array formulas has to be entered with Ctrl+Shift+Enter.

Values in A2:A5.
Text to search for in C2.
=SUM(IF(RIGHT($A$2:$A$5,LEN(C2))=C2,VALUE(LEFT($A$2:$A$5,LEN($A$2:$A$5)-LEN(C2))),0))

See sheet
Sum-numbers-before-text.xlsx
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question