ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to program move one cell down and copy? (https://www.excelbanter.com/excel-programming/409997-how-program-move-one-cell-down-copy.html)

Gary

How to program move one cell down and copy?
 
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

fishonspeed[_2_]

How to program move one cell down and copy?
 
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


Gary

How to program move one cell down and copy?
 
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


fishonspeed[_2_]

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



All times are GMT +1. The time now is 02:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com