Count of all non-blank rows in all remaining columns in a specified range, based on the filter in first column

TanviP

New Member
Joined
Mar 15, 2016
Messages
3
I have 4 columns like:
Team 1

<tbody>
</tbody>
Team 2

<tbody>
</tbody>
Team 3

<tbody>
</tbody>
Name

<tbody>
</tbody>
John

<tbody>
</tbody>
Shaun

<tbody>
</tbody>
Haley

<tbody>
</tbody>
Mike

<tbody>
</tbody>
Divya

<tbody>
</tbody>
Brittany
Alex

<tbody>
</tbody>
Molly

<tbody>
</tbody>
School

<tbody>
</tbody>
ABC

<tbody>
</tbody>
DEF

<tbody>
</tbody>
DEF

<tbody>
</tbody>
GHI

<tbody>
</tbody>
ABC

<tbody>
</tbody>

<tbody>
</tbody>

I need to find count of non blank rows in Team 1, Team 2, and Team 3, but filtered by the Name and School.
The result should look like:

Team 1Team 2Team 3
NameJohnShaunHaley
MikeDivyaBrittany
AlexMolly
323
SchoolABCDEF
DEFGHI
ABC
230

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Jobolobo

New Member
Joined
Mar 10, 2016
Messages
22
Hey TanviP,

Maybe give this a go. Using the "CountA" formula at the bottom of each of your columns.

CountA will count the non blank cells.

Code:
=CountA(Range)


ABCD
1Team 1Team 2Team 3
2JohnShaunHaley
3NameMikeDyviaBrittany
4AlexMolly
5=CountA(B2:B4)=CountA(C2:C4)=CountA(D2:D4)

<tbody>
</tbody>

The results should show a count of the non blank cells in each column.
 

TanviP

New Member
Joined
Mar 15, 2016
Messages
3
I need to write a macro for this to be done automatically on the click of a button. And I'm new to Excel and VBA :confused:
 

TanviP

New Member
Joined
Mar 15, 2016
Messages
3
I need to write a macro for this to be done automatically on the click of a button. And I'm new to Excel and <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym> :confused:
 

Watch MrExcel Video

Forum statistics

Threads
1,127,622
Messages
5,625,932
Members
416,143
Latest member
JoyceMB

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
Top