Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 42
Default 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   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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
limited cell movement thebusinessbus Excel Worksheet Functions 2 February 5th 10 05:18 PM
Cell to cell movement with arrow keys moves entire sheet ken heinemann Excel Worksheet Functions 1 December 29th 06 12:30 AM
How can I control cell movement with the Tab key? Bojo Excel Discussion (Misc queries) 4 September 3rd 05 01:16 AM
Force Cell Movement Jasmine Excel Discussion (Misc queries) 1 March 19th 05 12:06 AM
Incremental Cell Movement Weasel Excel Programming 2 September 5th 04 12:37 AM


All times are GMT +1. The time now is 10:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"