LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to program move one cell down and copy?

This will move any data from all used cells on sheet1 column1 to another
cell on sheet2 column1. Just change the destinations to fit your needs.

Sub CellMover()
Dim RowNumber
RowNumber = 1
'Checks to make sure there is a value in the cell.
Do While Worksheets("Sheet1").Cells(RowNumber, 1).Value < ""
'Makes the appropriate cell on Sheet2 the same as on Sheet1.
Worksheets("Sheet2").Cells(RowNumber, 1).Value =
Worksheets("Sheet1").Cells(RowNumber, 1).Value
'Increases the row.
RowNumber = RowNumber + 1
Loop
End Sub

--
I dispise your poor English and inability to use punctuation correctly ...
or at all.
~FishOnSpeed


"Gary" wrote:

I will be pasting it in a separate database

"fishonspeed" wrote:

What do you want to do with the copied cell? Its a simple macro to write but
what happens with the copied cell will affect the code in a big way.
--
I dispise your poor English and inability to use punctuation correctly ...
or at all.
~FishOnSpeed


"Gary" wrote:

Hi All:

I am new to programming macros in Excel. I would like a simple macro that
goes to the next cell in a column that has data and copy it then look for the
next one and so one. Any suggestions would be great. Thank you.

Gary

 
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
Program so that clicking on a cell will copy that cell to another Josh Johansen Excel Programming 4 June 19th 07 06:40 PM
How can user move in locked worksheet but not copy cell contents? PAT Excel Worksheet Functions 0 April 25th 06 08:40 PM
need to Copy or Move to active cell from specified range kaream Excel Discussion (Misc queries) 2 December 14th 05 08:12 AM
Move Copy sheet with cell having more than 255 characters Ajit Excel Programming 0 November 5th 04 07:56 PM
HOW DO I PROGRAM THE TAB KEY TO MOVE IN SPECFIC ORDER? COWBOY Excel Programming 1 November 4th 04 02:10 AM


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

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

About Us

"It's about Microsoft Excel"