Answers

Question and Answer:

  Home  MS Excel

⟩ Is there a way to determine the last active column in a spreadsheet?

In a macro, you can use:

LastCol = ActiveCell.SpecialCells(xlLastCell).Column

If you have a rectangular section of data which you know starts in Row 1, then you can use this to find the last column:

LastColumn = Range("IV1").End(xlLeft).Column

Use this to find the last row:

LastRow = Range("A65000").End(xlUp).Row

 181 views

More Questions for you: