Macro help

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
 
M

mudraker

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top