![]() ![]() ![]() = Application.Goto "MyRange" Select an entire row Range("1:1").Select Select an entire column Range("A:A").Select Select the last cell of a column of contiguous data Range("A1").End(xlDown).Select = Range("C3", "G8").Select Select a set of non contiguous cells Range("A2,A4,B5").Select Select a set of non contiguous cells and a range Range("A2,A4,B5:B8").Select Select a named range Range("MyRange").Select ![]() Select a set of contiguous cells Range("C3:G8").Select It seems Range() is much easier to read and Cells() is easier to use inside a loop. Select all the cells of a worksheet Cells.Select Select a cell Cells(4, 5).Select This article will show you how to use Range, Cells, Offset and Resize to select a range in Excel VBA. One of the basic things you need to do in Excel VBA is to select a specific range to do something with it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |