View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_690_] Leith Ross[_690_] is offline
external usenet poster
 
Posts: 1
Default Finding value and returning row number


Hello Merritts,

There are a few ways to do this...

Code:
--------------------

1) Using the Active Cell
R = ActiveCell.Row

2) Using a Range to find the First Row
R = Range("A2") 'R = 2
R = Range("A34:Z1250") 'R = 34, the first row in the range

3) Using a Range to find the Last Row
With Worksheets("Sheet1") 'R = last non blank cell in column A on Worksheet1
R = .Cells(.Rows.Count, "A").End(xlUp).Row
End With

--------------------


Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=564512