Macro help

  • Thread starter Thread starter Ahmad
  • Start date Start date
A

Ahmad

Hi all;
I have a small macro for my research, I'll apply this macro to another
sheets, but each sheet column length changed from sheet to sheet, how
I can automated this macro for different column length.

for example
sheet 1 column A length 20 variable
sheet 2 column A length 50 variable
sheet 1 column A length 30 variable

Thank

Ahmad
 
Ahmad


One way

This sets r = to the last row with data in column a



dim r as long
Dim r As Long
r = Sheets("sheet1").Range("a65536").End(xlUp).Row

sheets("sheet1").range("a1:a" & r).selec
 
Back
Top