Thread: cell movement
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ben Ben is offline
external usenet poster
 
Posts: 509
Default 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.