View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chet Chet is offline
external usenet poster
 
Posts: 88
Default Maximum non-blank row in a specific range as a variable

Anyone know how to simply find the maximum non-blank row in a specific
range? I found this

=(MAX((DataRange2<"")*ROW(DataRange2)))-ROW(DataRange2)+1

on Chip Pearson's web site but it's not exactly what I need. I
adapted it a bit because I need the result to be variable which I will
use in my VB code versus a static cell on the worksheet. What I tried
I have below but it doesn't work right yet.

MaxRow = FormulaArray((Application.WorksheetFunction.Max((" U5:AU25" <
"") * Application.Rows("U5:AU25"))) - Rows("U5:AU25") + 1). It seems
like there should be a simple way (like this?) to do this.

Thanks for your help.
Chet