Copy command within a macro

Closed
JBV - Jun 24, 2010 at 02:29 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 24, 2010 at 06:27 PM
Hello,
I built a macro to copy data from a worksheet tab to another tab. The size of the data file varies so bult the macro like this but it still only picks up the original ranges, always the same range. Can anyone help??

Range("A4").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("O.data").Select
Range("B132057").Select
ActiveSheet.Paste
Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 24, 2010 at 06:27 PM
Code seems to be correct. There might be white spaces so xldown and xltoright are selecting the cells that you dont want to select as they contain white spaces

Could you please upload a sample file with sample data etc on some shared site like https://authentification.site , http://docs.google.com, http://wikisend.com/ , etc and post back here the link to allow better understanding of how it is now and how you foresee. Based on the sample book, could you re-explain your problem too
0