Defining dynamic ranges in vba

Chase

How do I specify the cell in the column next to the very last cell with data in a spreadsheet e.g. if I have data in

Range(Cells(1, 1), Cells(lastRow, lastColumn))

How do I dynamically define

Range(Cells(1, 2), Cells(lastRow, n_lastColumn))

In a function such that n_lastColumn refers to the next column after lastColumn?

PaichengWu

Range(Cells(1,1), Cells(lastRow, lastColumn)).offset(,1)

or

Range("A1").currentregion.offset(,1)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related