Count across a data set or index

savvysum

New Member
Joined
Jun 22, 2022
Messages
19
Office Version
  1. 365
Platform
  1. MacOS
Hi, I need a count formula that counts names across multiple columns. I need to know how many people attended Philadephia. The answer is 5. Then pull the formal down to know how many attended Orlando = 6.
please note the blank cells are blank b/c there is a formula iferror return ""

A1 first cell
PhiladelphiaOrlando
John SmithRafael
Jane doeJohn Smith
Darren
jimmy
stanPhillips
nateJohn
nate
lookupanswer
Philadelphia5
Orlando6
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Try:

Book1
ABC
1
2A1 first cell
3PhiladelphiaOrlando
4John SmithRafael
5Jane doeJohn Smith
6Darren
7
8jimmy
9stanPhillips
10nateJohn
11nate
12
13lookupanswer
14Philadelphia55
15Orlando66
Sheet5
Cell Formulas
RangeFormula
C14:C15C14=SUMPRODUCT((A14=$A$3:$B$3)*($A$4:$B$11<>""))
 
Upvote 0
Then pull the formal down
No need to even pull this one down. Just put the formula in B12 (for my layout) & both results will appear.

24 01 16.xlsm
AB
1PhiladelphiaOrlando
2John SmithRafael
3Jane doeJohn Smith
4Darren
5
6jimmy
7stanPhillips
8nateJohn
9nate
10
11lookupanswer
12Philadelphia5
13Orlando6
Count attendees
Cell Formulas
RangeFormula
B12:B13B12=BYROW(A12:A13,LAMBDA(r,SUM(FILTER(--(A2:B9<>""),A1:B1=r))))
Dynamic array formulas.
 
Upvote 0
Try:

Book1
ABC
1
2A1 first cell
3PhiladelphiaOrlando
4John SmithRafael
5Jane doeJohn Smith
6Darren
7
8jimmy
9stanPhillips
10nateJohn
11nate
12
13lookupanswer
14Philadelphia55
15Orlando66
Sheet5
Cell Formulas
RangeFormula
C14:C15C14=SUMPRODUCT((A14=$A$3:$B$3)*($A$4:$B$11<>""))
thank you that works!
 
Upvote 0
No need to even pull this one down. Just put the formula in B12 (for my layout) & both results will appear.

24 01 16.xlsm
AB
1PhiladelphiaOrlando
2John SmithRafael
3Jane doeJohn Smith
4Darren
5
6jimmy
7stanPhillips
8nateJohn
9nate
10
11lookupanswer
12Philadelphia5
13Orlando6
Count attendees
Cell Formulas
RangeFormula
B12:B13B12=BYROW(A12:A13,LAMBDA(r,SUM(FILTER(--(A2:B9<>""),A1:B1=r))))
Dynamic array formulas.
thank you that works!
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up.
 
Upvote 0

Forum statistics

Threads
1,223,929
Messages
6,175,460
Members
452,644
Latest member
gjcase

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