help SUMIF function

riiiiiichhhhhhhhh

New Member
Joined
Feb 23, 2022
Messages
11
Office Version
  1. 2016
Platform
  1. Windows
Hi guys,
can please help me figure out how do i sum if cells in a range contain a certain number regardless whether they also contain a letter?


1002A100
sum numbers in column B for all cells in column A that contain the number 1002​
1002B200
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Can column A contain numbers longer than 4 digits, or more than one letter, and is the letter always at the end of the string?
 
Upvote 0
Hi there; try this:

Excel Formula:
=SUMPRODUCT(ISNUMBER(FIND("1002",A2:A100))*(B2:B100))
 
Upvote 0
From your descriptions, this may also work for you
Excel Formula:
=SUM(FILTER(B2:B100,LEFT(A2:A100,4)="1002",0))
 
Upvote 0
From your descriptions, this may also work for you
Excel Formula:
=SUM(FILTER(B2:B100,LEFT(A2:A100,4)="1002",0))
THANKS!
can i add another criteria? would like to the same thing but add a text for each row in a different column

1002A100ACTIVEsum all cells in column A that contain a letter only if column C contains "active"
1002B200CLOSED
 
Upvote 0
can i add another criteria? ... sum all cells in column A that contain a letter only if column C contains "active"
That is not just adding a criteria since you are also changing the initial criteria from
cells in column A that contain the number 1002
to
cells in column A that contain a letter

Anyway, see if this is what you want

22 10 15.xlsm
ABCDE
1
210021ACTIVE8
31002A2CLOSED
41002B3ACTIVE
510034CLOSED
62222X5ACTIVE
7
Sum (2)
Cell Formulas
RangeFormula
E2E2=SUM(FILTER(B2:B100,NOT(ISNUMBER(A2:A100))*(C2:C100="ACTIVE"),0))
 
Upvote 0
THANKS!
can i add another criteria? would like to the same thing but add a text for each row in a different column

1002A100ACTIVEsum all cells in column A that contain a letter only if column C contains "active"
1002B200CLOSED
You can also try this:

Excel Formula:
=SUMPRODUCT((B2:B100)*ISNUMBER(FIND("1002",A2:A100))*(C2:C100="active"))
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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