Return a sum value from a column with various entries in each cell

Trebbs

New Member
Joined
Jun 8, 2022
Messages
3
Office Version
  1. 365
  2. 2019
  3. 2007
Platform
  1. Windows
I have a spreadsheet that totals values from cells to a summary in another cell.
1654690748000.png

THe formula in cell M1 is =SUM(IF(ISNUMBER(FIND($L$1,M$9:M$260)),VALUE(LEFT(M$9:M$260,FIND($L$1,M$9:M$260)-1)),0))
the formula will total all the "L" values in the coumn, I wish to add another value into the cell as below
1654690925122.png

How can I adapt the formula to include the value of 4 in cell M3, this would also need to include all other values in the entire column that are 2 spaces to the left of "B"
Any help appreciated.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
this would also need to include all other values in the entire column that are 2 spaces to the left of "B"
As long as the pattern is: a digit, space and a letter, you can try this formula:

Dante Amor
KLMN
1L8
2D11
3B7
4S11
5M6
6C9
7
8Notes02-may
91 L, 2 D, 3 B, 4 S, 5 M, 6 C
103 L, 4 B
115 D, 6 S
121 M
132 D
141 S, 2 D
153 C, 4 L
16
Hoja7
Cell Formulas
RangeFormula
M1:M6M1=SUM(IF(ISNUMBER(SEARCH(L1,$M$9:$M$15)),--TRIM(SUBSTITUTE(SUBSTITUTE(MID($M$9:$M$15,SEARCH(", ? "&L1,", "&$M$9:$M$15),5),L1,""),",",""))))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Solution
As long as the pattern is: a digit, space and a letter, you can try this formula:

Dante Amor
KLMN
1L8
2D11
3B7
4S11
5M6
6C9
7
8Notes02-may
91 L, 2 D, 3 B, 4 S, 5 M, 6 C
103 L, 4 B
115 D, 6 S
121 M
132 D
141 S, 2 D
153 C, 4 L
16
Hoja7
Cell Formulas
RangeFormula
M1:M6M1=SUM(IF(ISNUMBER(SEARCH(L1,$M$9:$M$15)),--TRIM(SUBSTITUTE(SUBSTITUTE(MID($M$9:$M$15,SEARCH(", ? "&L1,", "&$M$9:$M$15),5),L1,""),",",""))))
Press CTRL+SHIFT+ENTER to enter array formulas.
Many thanks for the help
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0
If I have understood correctly and if you are using your MS 365 then a considerably shorter option might be ..

22 06 18.xlsm
LM
1L8
2D11
3B7
4S11
5M6
6C9
7
8Notes2/05/2022
91 L, 2 D, 3 B, 4 S, 5 M, 6 C
103 L, 4 B
115 D, 6 S
121 M
132 D
141 S, 2 D
153 C, 4 L
Sum
Cell Formulas
RangeFormula
M1:M6M1=LET(q,M$9:M$15&"0 "&L1,SUM(--RIGHT(LEFT(q,FIND(L1,q)-1),2)))
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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