![]() |
Using Column Name
Hi,
How do I copy a column that is called "Product Line" into Column A? The Product Line column is in a different column on different reports so I cannot reference it by column letter and hope to reference it by column heading/name. Thank you! Luce |
Using Column Name
To copy an entire column try something like, you can reference it by column
letter if you fully reference it with the name of the sheet The following copies the entire column D on sheet1 to column A on sheet2 Sheets("Sheet1").Columns("D:D").Copy Destination:=Sheets("Sheet2").Range("A1") -- Regards, Nigel "Lucky Lucy" wrote in message ... Hi, How do I copy a column that is called "Product Line" into Column A? The Product Line column is in a different column on different reports so I cannot reference it by column letter and hope to reference it by column heading/name. Thank you! Luce |
Using Column Name
Thank you Nigel. The problem I have is that I cannot reference by column
letter, as that column letter will vary on different worksheets. What I would like to do is reference by column heading/title, so I can use the same macro on different worksheets. Thanks, Luce "Nigel" wrote: To copy an entire column try something like, you can reference it by column letter if you fully reference it with the name of the sheet The following copies the entire column D on sheet1 to column A on sheet2 Sheets("Sheet1").Columns("D:D").Copy Destination:=Sheets("Sheet2").Range("A1") -- Regards, Nigel "Lucky Lucy" wrote in message ... Hi, How do I copy a column that is called "Product Line" into Column A? The Product Line column is in a different column on different reports so I cannot reference it by column letter and hope to reference it by column heading/name. Thank you! Luce |
All times are GMT +1. The time now is 12:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com