SUM values in a column IF other column STARTS WITH (no equal digits)

joostvanvlimmeren

New Member
Joined
Nov 20, 2014
Messages
12
Hi,

I have 2 columns, A & B.
A is filled with 3 to 5 digit numbers (different business classes)
B are their corresponding amount of employees.
I want to sum all employees that are in the same category from A (type of business) but i only need the first 2 digits from column A. For example starting with the number 14.

I already tried things like: =SUMIF(A2:A28,"14*",B2:B282) but that don't seem to work. I got ms excel 2010. I also tried thinks with LEFT but me and excel are not really friends with that, it seems to fail over and over again.

Thanx for you time, this is really important for my research.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi

Welcome to MrExcel Forum.

Perhaps SUMPRODUCT can step into the breach :-
Code:
=SUMPRODUCT(--(LEFT(A2:A282,2)+0=14),--(B2:B282))

hth
 
Last edited:
Upvote 0
=SUMIF(A2:A28,"14*",B2:B282)
Perhaps I elaborated too much on your OP. Could it be :-
Code:
=SUMPRODUCT(--(LEFT(A2:A28,2)+0=14),--(B2:B28))

The ranges in the SUMPRODUCT have to be equal length!

Otherwise, what is the error you are getting? My clairvoyancy skills seem to have left me today.
 
Upvote 0
=SUMPRODUCT(--(LEFT(A2:A282&"00",2)+0=14),B2:B282)

should succeed. By the way, you might need to change comma to a semi-colon on an European system.
 
Upvote 0

Forum statistics

Threads
1,224,590
Messages
6,179,752
Members
452,940
Latest member
rootytrip

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