Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy from worksheet
Having the name of a worksheet in cell A1, I would like to extract
non-contiguous data from the sheet of that name and paste it onto my "Data temp" sheet. How can I get the data to extract from the named sheet onto the Data Temp sheet? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy from worksheet
More info and layout
-- Don Guillett SalesAid Software "Tom" wrote in message ... Having the name of a worksheet in cell A1, I would like to extract non-contiguous data from the sheet of that name and paste it onto my "Data temp" sheet. How can I get the data to extract from the named sheet onto the Data Temp sheet? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy from worksheet
Sub move_it()
Dim ws As Worksheet Set ws = Sheets(Range("A1").Value) s = Array("B1", "Z1") For i = LBound(s) To UBound(s) ws.Range(s(i)).Copy Sheets("Data temp").Range(s(i)) Next End Sub Note that s is a string array that the contains the disjoint range to be copied. -- Gary''s Student - gsnu200722 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy from worksheet
Works just as I had hoped!
Much appreciated Gary. "Gary''s Student" wrote: Sub move_it() Dim ws As Worksheet Set ws = Sheets(Range("A1").Value) s = Array("B1", "Z1") For i = LBound(s) To UBound(s) ws.Range(s(i)).Copy Sheets("Data temp").Range(s(i)) Next End Sub Note that s is a string array that the contains the disjoint range to be copied. -- Gary''s Student - gsnu200722 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy & paste cells fr open worksheet then close the worksheet | Excel Programming | |||
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 | Excel Worksheet Functions | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming | |||
copy range on every worksheet (diff names) to a master worksheet (to be created) | Excel Programming | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming |