schardt679
Board Regular
- Joined
- Mar 27, 2021
- Messages
- 58
- Office Version
- 365
- 2010
- Platform
- Windows
- Mobile
- Web
Returns the total cell count, total row count, or total column count of a given range.
Excel Formula:
=LAMBDA(Array,Info_Type,
LET(Arr, Array&"", Info, Info_Type, InfoScan, AND(Info<>{2,1,0}), InfoMSG, "Info_Type=0,1,2",
RowCt, ROWS(Arr), ColCt, COLUMNS(Arr), TotalCells, RowCt*ColCt,
Result, SWITCH(Info, 1, RowCt, 2, ColCt, TotalCells), Return, IF(InfoScan, InfoMSG, Result),
Return)
)
CELLCOUNT | |||||
Returns total cells, rows, or columns of a range as a number | |||||
Total cells= 0 or ingnored; total rows= 1; or total columns= 2 | |||||
Returns a number corresponding to the above | |||||
Range | Result | ||||
1 | 2 | 8 | |||
3 | 4 | ||||
5 | 6 | ||||
7 | 8 | ||||
Total cell count is returned | |||||
=CELLCOUNT(B7#,) | |||||
Range | Result | ||||
1 | 2 | 4 | |||
3 | 4 | ||||
5 | 6 | ||||
7 | 8 | ||||
Total row count is returned | |||||
=CELLCOUNT(B18#, 1) | |||||
Range | Result | ||||
1 | 2 | 2 | |||
3 | 4 | ||||
5 | 6 | ||||
7 | 8 | ||||
Total column count is returned | |||||
=CELLCOUNT(B29#, 2) | |||||
Upvote
0