Selecting blank cells

  • Thread starter Thread starter Fernando G,
  • Start date Start date
F

Fernando G,

Happen that I am trying to set a macro where I have to go to the last row
with information, then select "A-last" & "B-last" to the A1:B1, I did this:
Range("C65536").Select
Selection.End(xlUp).Select

But I do not know how to move to select A:B from the last row with
information

Any help would be appreciated.

Fernando
 
Maybe...

Dim LastRow as long

with ActiveSheet
'use column C to get the lastrow
lastrow = .cells(.rows.count,"C").end(xlup).row
'What did you want selected???
.range("a1:a" & lastrow).select
.range("b1:b" & lastrow).select
.range("a1:b" & lastrow).select
end with
 
Back
Top