Array of Counts

BrianGGG

Board Regular
Joined
Mar 5, 2016
Messages
62
Hello. I'd like to figure out a formula in a single cell that returns an array of counts rather than an overall grand total count for a given list of columns.

Example. If I have the following 3 columns and four rows:


Code:
 x          x
       x
       x
       x    x

The answer I am looking for is {1,3,2} because the COUNTA value of each column would be 1,3,2 respectively.
If I try something like COUNTA(A1:A4:C1:C4) I just get the grand total of 6 as a single value.


Any ideas how to return the COUNTA value for columns in an array?




thanks
BrianGGG
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try:

=MMULT(TRANSPOSE(ROW(A1:A4))^0,--(A1:C4<>""))

with Control+Shift+Enter. You can use this as part of another formula, or select a 3-column range when entering the formula.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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