View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
ross ross is offline
external usenet poster
 
Posts: 81
Default URGENT!! macro for moving data to different spreadsheet

There are a number of way to do this. thinking of the top of my head
try somthing like this...i will asume the number of cells is always 10

creat a 3d link to all the cell you need from the 1st page, on a
second page
(you do this ny putting = in a cells, then clicking the tab of the
1st sheet, then click the cell you wont to link), you might have

a b c
=sheet1!a2
=sheet1!a6
=sheet1!d59

and so on

now add a button on the second worksheet (from the controls tool box)
and add this code, it works on the asumtion of 10 figures in you list,
but you can change this, it also sticks a number in cell b1, this
will comtrol where the data is put in you long list



x=("YouSecondSheetName").range("b1").value

if x <1 then
x=1
else end if


sheets("YouSecondSheetName").range("A1:A10").copy
sheets(("YouSecondSheetName").cells(x,4).paste
x = x +10
("YouSecondSheetName").range("b1").value = x

this will put the figures in the range a1:a10 in a list in coulum d,

not that the figure in colum b, cell b1 controls where the data will
actually go, and that why it get added to each time you run the code.


i haven't tested this, so i hope it works! it show the idea any way

Good Luck
Ross