0

I would like to ask, if I need to select an entire row, start from the 3rd row as a range in VBA, instead of the below line, any better ways to go about it? Many thanks.

Range("C3:C1048576").Select
Bubbles
  • 455
  • 2
  • 8
  • 1
    There is obviously more to this then what is presented here. To answer this question, to "select" ([which should be avoided](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba)) all rows below 2nd row in a column, the method you are using is the best. Now if you want to also find the last cell with a value see [HERE](https://stackoverflow.com/questions/11169445/find-last-used-cell-in-excel-vba). Then you can limit it to just the data. – Scott Craner Nov 03 '22 at 17:43
  • 3
    That's the 3rd **column**. If you want to make it work in any version of Excel, you'll use something like `Range("C3:C" & Rows.Count)`. If you need the range from `C3` to the last non-empty cell, you could use `Range("C3", Range("C" & Rows.Count).End(xlUp))` or `Range("C3", Cells(Rows.Count, "C").End(xlUp))`. – VBasic2008 Nov 03 '22 at 17:51

1 Answers1

2

Assuming your working with an Excel Worksheet, this line will do it ActiveWorkbook.Worksheets(1).Rows(3).Select

john-project
  • 331
  • 1
  • 7