ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying a cell one at a time (https://www.excelbanter.com/excel-programming/318527-copying-cell-one-time.html)

SD

Copying a cell one at a time
 
Hi there,

This is a basic question i think.
I am trying to copy a cell one at a time from onw worksheet to another and
then run another macro called "Prices" once it is on the correct cell.

I have a list of products in worksheet("data") from range("a1:a10") although
this range will get larger with more products.

I need a loop that will start at RANGE("a1") in data worksheet and copy this
value to cell a1 in worksheet("IV"). Then it will call another macro called
Prices to run. Once this has been completed it will go back to
worksheets("data") and copy the next cell "a2" into the worksheet("IV") and
run the macro and so forth on to the next cell until it reaches the end of
the list.

Thanks for your help

JulieD

Copying a cell one at a time
 
Hi SD

something along the lines of

Sub dothings()
Dim i As Long
Dim lastRow As Long
lastRow = Sheets("Data").Range("A" & Rows.Count).End(xlUp).Offset(1,
0).Row
For i = 1 To lastRow
Sheets("Data").Range("A" & i & "").Copy Sheets("IV").Range("A" & i &
"")
Call Prices
Next
End Sub

Cheers
JulieD


"SD" wrote in message
...
Hi there,

This is a basic question i think.
I am trying to copy a cell one at a time from onw worksheet to another and
then run another macro called "Prices" once it is on the correct cell.

I have a list of products in worksheet("data") from range("a1:a10")
although
this range will get larger with more products.

I need a loop that will start at RANGE("a1") in data worksheet and copy
this
value to cell a1 in worksheet("IV"). Then it will call another macro
called
Prices to run. Once this has been completed it will go back to
worksheets("data") and copy the next cell "a2" into the worksheet("IV")
and
run the macro and so forth on to the next cell until it reaches the end of
the list.

Thanks for your help





All times are GMT +1. The time now is 01:17 AM.

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