SUMIF function on a lookup range

patu123

New Member
Joined
May 24, 2011
Messages
7
I am kind of new to this form but I am kind of stuck and need help desprately!

I am trying to sum total number of products sold by any perticular person in a lookup range and the formula I am using works if I specify acutal names but the problem is my lookup name range is about 200 names and am scared to physically type this names in a formula. Is there a better way to handle this.

The formula I am using is as:

=SUM(SUMIF(A5:A5450,{"JOHN","ROBERT","CHARLIE"},O5:O5450))

Any input will be a break for me!!!!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Welcome to the board..

You can convert that to an array formula like

=SUM(SUMIF(A5:A5450,B1:B200,O5:O5450))

Where B1:B200 are your list of names to check (John, Robert, Charlie)

IMPORTANT
This is an array formula that requires CTRL + SHIFT + ENTER
After entering the formula, highlight cell with formula and press F2
Then press CTRL + SHIFT + ENTER
When entered correctly, the formula will be enclosed in {brackets}

Hope that helps.
 
Upvote 0
Or I was going to suggest using a named range. names is the named range which encompasses the list of names.

and then =SUMPRODUCT(SUMIF(A5:A5450,names,O5:O5450))
 
Upvote 0
I am kind of new to this form but I am kind of stuck and need help desprately!

I am trying to sum total number of products sold by any perticular person in a lookup range and the formula I am using works if I specify acutal names but the problem is my lookup name range is about 200 names and am scared to physically type this names in a formula. Is there a better way to handle this.

The formula I am using is as:

=SUM(SUMIF(A5:A5450,{"JOHN","ROBERT","CHARLIE"},O5:O5450))

Any input will be a break for me!!!!
List the names in a range of cells:
  • X5 = JOHN
  • X6 = ROBERT
  • X7 = CHARLIE
Then the formula is:

=SUMPRODUCT(--(ISNUMBER(MATCH(A5:A5450,X5:X7,0))),O5:O5450)
 
Upvote 0
Awesome guys, you are the best this worked. I tried this earlier but wasnt working but I want making it absoulute (ctrl + shift + enter) but all is good now!!!

Made my day and now I can start cuising back!!!!:)
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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