Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell movement
This is my first attempt at a macro. All I want to do is take data
from one sheet and put it in a second sheet. With each time the second sheet is updated, I want to get the data in the next cell from the first sheet. How do I write a macro to point to a different sheet, one cell down. I hope I am making sense. It is a depreciation detail schedule that I am working with and want to update a summary sheet without having to manually change the value in all the cells on the summary sheet. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell movement
sheets("sheet1").select
range("A1:d1").copy ''copy the data u want sheets("sheet2").select LastRow = Cells(Rows.Count, 1).End(xlUp).Row + 1 ''finds the last row in column 1 Rows(lastrow).Select ''selects the row ActiveCell.PasteSpecial ''paste the copied data -----Original Message----- This is my first attempt at a macro. All I want to do is take data from one sheet and put it in a second sheet. With each time the second sheet is updated, I want to get the data in the next cell from the first sheet. How do I write a macro to point to a different sheet, one cell down. I hope I am making sense. It is a depreciation detail schedule that I am working with and want to update a summary sheet without having to manually change the value in all the cells on the summary sheet. . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell movement
Jeff,
use the cells command sub switchdata() for r=1 to 100 for c=1 to 100 'r is for rows 'c is for columns oldval = sheet1.cells(r,c).value sheet2.cells(r,c).value = oldval next next end sub substitute for r and c where you would like the data copied from and applied to ben "Jeff Lavendol" wrote: This is my first attempt at a macro. All I want to do is take data from one sheet and put it in a second sheet. With each time the second sheet is updated, I want to get the data in the next cell from the first sheet. How do I write a macro to point to a different sheet, one cell down. I hope I am making sense. It is a depreciation detail schedule that I am working with and want to update a summary sheet without having to manually change the value in all the cells on the summary sheet. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
limited cell movement | Excel Worksheet Functions | |||
Cell to cell movement with arrow keys moves entire sheet | Excel Worksheet Functions | |||
How can I control cell movement with the Tab key? | Excel Discussion (Misc queries) | |||
Force Cell Movement | Excel Discussion (Misc queries) | |||
Incremental Cell Movement | Excel Programming |