Selecting cells on active row

M

merry_fay

Hi,

Having used a macro to get the first cell on the row I need selected, how do
I then get it to select the range A:H or even the entire row? I can't do
xlright as there may be blanks in some columns.

Also, is there a way of getting the macro to select a cell with a specific
word in it? I've managed a work-around but it would be nicer to use more
specific, neat code

Thanks
merry_fay
 
G

Gary''s Student

Sub GetBlock()
Dim L As Long
L = ActiveCell.Row
Range("A" & L & ":H" & L).Select
End Sub

This will Select A thru H in the row with the ActiveCell.
 
Top