Need to sum everything with a code with a 70

richmcgill

Board Regular
Joined
Feb 4, 2019
Messages
93
Office Version
  1. 2016
Platform
  1. Windows
I need to be able to sum everything with a code 70-79. I need to exclude anything that has a different number than a 70-79.
All codes begin with a number but the second digit in the report is what I need to target.
The number always has a space between the two digits.
i.e. 1 70
Some of the numbers are negatives but still sum if it has a 70-79 code.
Make sense?



Code 1 711 721 753 111 721 731 721 733 513 111 721 721 733 111 73
AmountSum if the Code (row 1) is a 70 ( 1 72) number$1,553.06 $1,553.06 $1,553.06 '-$2,460.29$1,553.06 $449.08 $1,517.23 $1,517.23 '-$1,504.00'-$2,120.00$1,517.23 $1,517.23 $1,517.23 '-$1,971.21$1,517.23
 

Attachments

  • Screenshot 2025-01-03 120838.jpg
    Screenshot 2025-01-03 120838.jpg
    38.1 KB · Views: 8

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
MrExcelPlayground23.xlsx
ABCDEFGHIJKLMNOPQ
13Code1 711 721 753 111 721 731 721 733 513 111 721 721 733 111 73
14Amount$15,764.70$1,553.06$1,553.06$1,553.06($2,460.29)$1,553.06$449.08$1,517.23$1,517.23($1,504.00)($2,120.00)$1,517.23$1,517.23$1,517.23($1,971.21)$1,517.23
Sheet25
Cell Formulas
RangeFormula
B14B14=SUM((VALUE(RIGHT(C13:Q13,3))>=70)*(VALUE(RIGHT(C13:Q13,3))<80)*($C$14:$Q$14))
 
Upvote 0
Hi, here's another option that might work depending on how consistent your "codes" are.

Book3
ABCDEFGHIJKLMNOPQ
1Code1 711 721 753 111 721 731 721 733 513 111 721 721 733 111 73
2Amount15764.71553.061553.061553.06-2460.291553.06449.081517.231517.23-1504-21201517.231517.231517.23-1971.211517.23
Sheet1
Cell Formulas
RangeFormula
B2B2=SUMIFS(C2:Q2,C1:Q1,"? 7*")
 
Upvote 0
Solution
Hi, here's another option that might work depending on how consistent your "codes" are.

Book3
ABCDEFGHIJKLMNOPQ
1Code1 711 721 753 111 721 731 721 733 513 111 721 721 733 111 73
2Amount15764.71553.061553.061553.06-2460.291553.06449.081517.231517.23-1504-21201517.231517.231517.23-1971.211517.23
Sheet1
Cell Formulas
RangeFormula
B2B2=SUMIFS(C2:Q2,C1:Q1,"? 7*")
Thank you! This one worked very well.
 
Upvote 0
post 5 Your question is not clear. What did you try?

Consider the following:
T202501a.xlsm
AB
17-1,504.00
18-8,055.50
19
3a
Cell Formulas
RangeFormula
B17B17=SUMIFS(C14:Q14,C13:Q13,"3 51")
B18B18=SUMIFS(C14:Q14,C13:Q13,"3*")
 
Upvote 0

Forum statistics

Threads
1,225,763
Messages
6,186,896
Members
453,384
Latest member
BigShanny

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