justme1122
New Member
- Joined
- Mar 6, 2011
- Messages
- 47
Hi Im a noob at VBA and have been trying to working this out for a little while now.
I have several template sheets that update data from csv file. Some of these templates are huge files due to formulas and to minimise file size I delete all but the top line of the formulars before saving or emailing and then copy and paste them back in when I open the file. Most of these files will have a diffrent number of rows.
So below is basic VBA but what I need it to paste in colum b if only there is data in colum A. Data is sorted so you could select the paste range by counting the rows in colum A.
Thanks so much for any help
I have several template sheets that update data from csv file. Some of these templates are huge files due to formulas and to minimise file size I delete all but the top line of the formulars before saving or emailing and then copy and paste them back in when I open the file. Most of these files will have a diffrent number of rows.
So below is basic VBA but what I need it to paste in colum b if only there is data in colum A. Data is sorted so you could select the paste range by counting the rows in colum A.
Code:
Sub Macro1()
' Macro1 Macro
'
'
Range("b1").Select
Selection.Copy
Range("b3").Select
ActiveSheet.Paste
Range("A1").Select
End Sub
Thanks so much for any help