Sumproduct or Something off the wall

swaink

Active Member
Joined
Feb 15, 2002
Messages
432
Hi All I wonder if anyone is able to assist please.

I have a spreadsheet with many many rows and I need to count how many times a name appears is column B and the Item is in column G, where the name is that shown in AK27 and the Item in column G is in the list at "AN27:AN33."

I would normally use sumproduct and this would mean me transposing the item list and then performing the sumproduct in each column. i.e. in cell AL27 formula =sumproduct(--(B:B = AK27),--(G:G = AN27))

My question is doe's anyone know if it possible to use sumproduct where the name = "Barrry" and Barry has any of the items in the list, the aim would be to have one total figure for all of the items rather than 7 seperate columns of figures.

I know its off the wall

Kevin
QCC Data Changer 4.2.xls
AKALAMAN
26NameItem
27BarryItemA
28ClaireItemB
29PhilipItemH
30RobertItemK
31NigelItemL
32ChrisItemM
33EricItemW
34Rodney
35Sharron
36Peter
37Kevin
38Shaun
39Jeannette
40Rachele
41Susan
42Heather
43David
44Pamela
45Gordon
46Craig
47Gregory
SheetA
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi,

Try something like this:
Code:
=SUMPRODUCT(
    --ISNUMBER(MATCH(G27:G60,AN27:AN33,0)),
    --(B27:B60=AK27))

Adjust the G27:G60 and B27:B60 ranges to suit, but note that they cannot reference the entire column unless you are using Excel 2007.

Hope that helps
 
Upvote 0
Hi Colin

Many thanks for the quick reply.

This works fine and is far more simple than the way I would have tackled it , I am glad I asked the question

Appreciate your help

Kevin
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,020
Members
448,939
Latest member
Leon Leenders

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