Forum Discussion
Count number of columns with value
I may have laid my spreadsheet out differently (in rows), but a single formula is quite easy:
=MAX(COUNT(A4:L4),COUNT(A5:L5),COUNT(A6:L6))
if you wanted to get the largest sum of the three rows, just change COUNT to SUM. Etc.
Changing MAX to MIN would get the smallest.
- Chan_Tze_LeongFeb 10, 2021Brass Contributor
mathetes Assuming the area to count is column A to M. Instead of having to define each row (A4: M4), is it possible to do the same count by area (A4:M6) and the outcome is 12?
- Chan_Tze_LeongFeb 10, 2021Brass Contributor
Chan_Tze_Leong I have close to 40 excel files with varying areas. So, to do each row range , is very tedious and time consuming. Imagine, for 1 file, I have to select 10 times for 10 rows. Alternatively, selecting the area is only 1 time activity.
- SergeiBaklanFeb 11, 2021Diamond Contributor
- select you area
- in Name Box (top left from the grid) type Range and press Enter
- enter the formula in suitable empty cell
=MAX(MMULT(--(Range<>""),TRANSPOSE(COLUMN(Range)/COLUMN(Range))))