![]() |
Copying cells
Hi
I have the lots of sheets all set out in the following format A B C D E 15 JAN APC SUPPLIES GBP C19278 2652.25 There could be any number of lines. What I would like to do is copy the data to a template I have set up. I would like B1 to be copied to B6 on the template file. With Columns A, C, D and E I need these copying to A16, B16, C16 and D16 respectively. If possible I would also like the name of the original sheet to be copied to cell B10 and then to save as the reference in B10 if this is possible. Thanks Jahson |
Copying cells
Jahso
The following should start you going. It assumes that book1 is the data sheet, and book2 is the template. It copies the data from row 1 in book1 to the specified output area in book2 Ton Sub aaa( Set outfile = Workbooks("book2").Sheets("sheet1" Workbooks("book1").Activat Range("b1").Copy Destination:=outfile.Range("b6" Range("a1").Copy Destination:=outfile.Range("a16" Range("c1:e1").Copy Destination:=outfile.Range("b16" outfile.Range("b10").Value = ActiveSheet.Nam End Su ----- Jahson wrote: ---- H I have the lots of sheets all set out in the following forma A B C D 15 JAN APC SUPPLIES GBP C19278 2652.2 There could be any number of lines. What I would like to do is copy the data to a template I have set up. I would like B1 to be copied to B6 on the template file. With Columns A, C, D and E I need these copying to A16, B16, C16 and D16 respectively. If possible I would also like the name of the original sheet to be copied to cell B10 and then to save as the reference in B10 if this is possible Thank Jahso |
All times are GMT +1. The time now is 04:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com