SUM numbers on cells containing specific text.

78459430

New Member
Joined
Apr 1, 2022
Messages
15
Office Version
  1. 365
  2. 2021
Platform
  1. MacOS
Hello,

I am trying to SUM only the value (in USD) of a cell that also contains a specific text. Please help, I ran out of ideas :)
Here below a screen-shot of my cells.
 

Attachments

  • Screen Shot 2022-04-01 at 17.43.25.jpg
    Screen Shot 2022-04-01 at 17.43.25.jpg
    94.5 KB · Views: 36

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Hi,

Welcome to MrExcel.

That is a bad way to set up your data, it makes calculation way more complicated than it needs to be.
Also, please consider showing samples using XL2BB, see my signature, or at least in Table format, so helpers don't have to manually type up your data.

Book3.xlsx
AB
1
2$980 (check 5/1/2019)
3$1,585 (check 8/1/2019)
4$2,000 (check 12/1/2020)
5$50,588 (check 4/1/2021)
6$189,845 (check 2/1/2022)
7$15 (check 2/11/2022)
8
9Result
1020192565
1120202000
12202150588
132022189860
Sheet1074
Cell Formulas
RangeFormula
B10:B13B10=SUMPRODUCT(ISNUMBER((FIND("/"&A10,B$2:B$7)))*(LEFT(B$2:B$7,FIND("(",B$2:B$7)-1)))
 
Upvote 0
Hi,

Thank you so much for the reply and the the tips, sorry it is my first post here.
I know I should use multiple columns but that's what I need to do.
Also, I get an error because I added some cells with just a number value w/out text (those "Extras" rows) and this creates an error I think... and I don't know how to solve it.
Perhaps you know :)

1648859985848.png
 
Upvote 0
Oops, here is the table format.

extras$8,000
$980 (check 5/1/2019)
$1,585 (check 8/1/2019)
$2,000 (check 12/1/2020)
$50,588 (check 4/1/2021)
Extras$2,000
$189,845 (check 2/1/2022)
$15 (check 2/11/2022)
Result:
2019=SUMPRODUCT(ISNUMBER((FIND("/"&A10,B$2:B$7)))*(LEFT(B$2:B$7,FIND("(",B$2:B$7)-1)))
2020=SUMPRODUCT(ISNUMBER((FIND("/"&A11,B$2:B$7)))*(LEFT(B$2:B$7,FIND("(",B$2:B$7)-1)))
2021=SUMPRODUCT(ISNUMBER((FIND("/"&A12,B$2:B$7)))*(LEFT(B$2:B$7,FIND("(",B$2:B$7)-1)))
2022=SUMPRODUCT(ISNUMBER((FIND("/"&A13,B$2:B$7)))*(LEFT(B$2:B$7,FIND("(",B$2:B$7)-1)))
 
Upvote 0
Here is also the Mini-sheet. Thanks.
Book6
AB
1Extras$8,000.00
2$980 (check 5/1/2019)
3$1,585 (check 8/1/2019)
4$2,000 (check 12/1/2020)
5$50,588 (check 4/1/2021)
6Extras$2,000.00
7$189,845 (check 2/1/2022)
8$15 (check 2/11/2022)
9
10Result
112019#VALUE!
122020#VALUE!
132021#VALUE!
142022#VALUE!
Sheet1
Cell Formulas
RangeFormula
B11:B14B11=SUMPRODUCT(ISNUMBER((FIND("/"&A11,B$2:B$8)))*(LEFT(B$2:B$8,FIND("(",B$2:B$8)-1)))
 
Upvote 0
Thanks for he XL2BB sample. See if this could work for you.

22 04 02.xlsm
AB
1Extras8000
2$980 (check 5/1/2019)
3$1,585 (check 8/1/2019)
4$2,000 (check 12/1/2020)
5$50,588 (check 4/1/2021)
6Extras2000
7$189,845 (check 2/1/2022)
8$15 (check 2/11/2022)
9
10Result
1120192,565
1220202,000
13202150,588
142022189,860
1520230
Sum
Cell Formulas
RangeFormula
B11:B15B11=LET(f,FILTER(B1:B8,RIGHT(B1:B8,6)="/"&A11&")","0 "),SUM(LEFT(f,FIND(" ",f))+0))
 
Upvote 0
Solution
Thanks for he XL2BB sample. See if this could work for you.

22 04 02.xlsm
AB
1Extras8000
2$980 (check 5/1/2019)
3$1,585 (check 8/1/2019)
4$2,000 (check 12/1/2020)
5$50,588 (check 4/1/2021)
6Extras2000
7$189,845 (check 2/1/2022)
8$15 (check 2/11/2022)
9
10Result
1120192,565
1220202,000
13202150,588
142022189,860
1520230
Sum
Cell Formulas
RangeFormula
B11:B15B11=LET(f,FILTER(B1:B8,RIGHT(B1:B8,6)="/"&A11&")","0 "),SUM(LEFT(f,FIND(" ",f))+0))
GENIUS! Love Excel and its endless possibilities, I wish I would know how to use it fully :)
Thank you thank you!!!!!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0
One more question... what if I need to SUM only cells (on column B) that contains a specific text (for example CHECK).

Thanks.
 
Upvote 0
what if I need to SUM only cells (on column B) that contains a specific text (for example CHECK).
Like this? (If this is not it, please provide sample data and expected results with XL2BB.)

78459430.xlsm
AB
1Extras8000
2$980 (check 5/1/2019)
3$1,585 (check 8/1/2019)
4$2,000 (check 12/1/2020)
5$50,588 (check 4/1/2021)
6Extras2000
7$189,845 (check 2/1/2022)
8$15 (check 2/11/2022)
9
10Result
11245,013
Sum
Cell Formulas
RangeFormula
B11B11=LET(f,FILTER(B1:B8,ISNUMBER(SEARCH("check",B1:B8)),"0 "),SUM(LEFT(f,FIND(" ",f))+0))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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