View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Aaron Dyck Aaron Dyck is offline
external usenet poster
 
Posts: 12
Default Determine the last non-blank cell in a range

I have a range (called rng), and I need to determine the row number that the
last non-blank cell in this range refers to. I have the following code:

set rng=thisworkbook.sheets(1).range("A1:A65535")

There should be no non-blanks in the sheet between the first entry (in A1)
and the last entry (which I am trying to find). I need to set my counter
variable, z, to the number of records in the range.

Any suggestions?