Max Non Blank cells in a column for range with more than 1 column

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
]Hi and thanks in advance!

Say I have 10 columns with data in some cells
A1:J50

Range("A1:A50") may have 10 non blank cells
Range("A1:A50") may have 15 non blank cells
Range("B1:B50") may have 07 non blank cells
Range("C1:C50") may have 21 non blank cells
Range("D1:D50") may have 26 non blank cells
Range("E1:E50") may have 03 non blank cells

I need a formula to give me the Max number of cells non Blanks in a single column

In my case 26
I have created a dinamic range.

But I do not want to use:


referes to := MAX(Counta(A1:A50);Counta(B1:B50)...) etc...
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
hmm... i think you need the last row with data in the Range(A1:J50) to create correctly the named range, not the Max of non-blank cells on each column.
Suppose column A has just one cell with data, say A50. If so, i suppose, the named range should be A1:J50 irrespective of the number of non-blank cells in the other columns. Am i right?

M.
 
Last edited:
Upvote 0
I was not thinking, but actuaslly you are right
If A50 is Non Blank then 50 is the Answer
Anyway suppose I am using a Table, actually I can't but, if column D goes until Row 26 then the Answer is 26, if Column F goes until F36 then the answer should be 36
any idea ?
 
Upvote 0
Assuming your data are in Sheet1 to create the named range, say, MyRange, try

Formulas > Names Manager > New
Name: MyRange
Refers to: =Sheet1!$A$1:INDEX(Sheet1!$J$1:$J$50,MAX(INDEX((Sheet1!$A$1:$J$50<>"")*ROW(Sheet1!$A$1:$J$50),)))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,216,071
Messages
6,128,623
Members
449,460
Latest member
jgharbawi

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