Hi
I have a worksheet which contains basic data such as Name, ID number, etc in columns A-U. Then from column V onwards I have data pertaining to months and variances, i.e. column V is titled: JAN-13, W is titled: Adjustment and X is titled: Dfference, this is then repeated across the columns with only the month changing i.e. Y is FEB-13, Z is Adjustment, AB is Difference etc. I am hoping that someone will help provide me code to copy all data from columns A-U and then data from the columns titled "Months" only, so copy A:U aswell as column V, Y etc. The data is updated every month, so the number of rows also varies.
I have the following code so far, which works, but is there a way I can refer to column heading i.e. "Jan-13" and ask it to select all popolated rows in the column instead of inserting all the ranges, as currently I have to update them everytime the rows# or columns change. Also, in the below code the copied column titles format as number rather than date.
Sub CopyPasteValue()
Sheets.Add().Name = "Template"
Sheets("Original").Range("A1:V3657,Y1:Y3657,AB1:AB3657,AE1:AE3657,AH1:AH3657,AK1:AK3657,AN1:AN3657,AQ1:AQ3657,AT1:AT3657").Copy
Sheets("Template").Range("A1").PasteSpecial _
Paste:=xlPasteValues
End Sub
Thanks in advance
Jen
Bookmarks