View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default lastrow in formula

Hi

You don't tell us whether were looking for text or numeric so

Numeric
=ROW(INDEX(B:B,MATCH(9.99999999999999E+307,B:B)))
text
=ROW(INDEX(B:B,MATCH(REPT("z",10),B:B,1),1))

Both of which are arrays so commit with Ctrl+Shift+enter


Mike

"Steve" wrote:

Hi everyone. I have a summary block on the top of a worksheet. Below
that is data, which is VBA populated and therefore every time the code
is run the amount of rows of data changes. How can I have a cell in
my Summary section do a direct cell reference on the last row? For
example, when I run the code, the last row of data is in row 45. So
the summary cell wold reference C45. If the last row was on 75, the
summary would reference C75. Thanks!