-3

I have a table which is dynamic, amount of rows is always changing.

I'm looking for the code which would allow me to Select range within the table until last entry in the rows of whole range. Most formulas would select until last entry in the first column, but it can not be filled up.

MARKED BY RED Thnaks a lot

Alex
  • 1
  • 2
  • Thanks, Unfortunately trick select column H all the way down through entire worksheet. Idea was to select range marked by red. in the origin screenshot – Alex Mar 14 '19 at 15:36

1 Answers1

2

This should do the trick

Dim ws as Worksheet: Set ws = Sheets("Sheet1") ' replace Sheet1 with ur sheet name
Dim lr as Long: lr = ws.Cells(Rows.Count, 8).End(xlUp).Row

ws.Range("H23:H" & lr).Select

However, If I were you, I'd steer clear from .Select, there are other much more effective means of achieving the same result.

Samuel Hulla
  • 6,617
  • 7
  • 36
  • 70