amitcohen
Board Regular
- Joined
- Jan 14, 2010
- Messages
- 118
Hi All
I use the following macro to copy a cell from sheets("DB").Select
and paste it to a cell in another sheet.
Now, I need to select different cell each time
So instead of copy-paste same cell ("A1") every time
Macro will select different cell. (A2, A3, A4 etc')
Something like Range("A" & i).Select, maybe.
I'm not sure how to create the loop for the macro to select the next cell to copy-paste.
Hope you can help.
Many thanks,
Amit.
I use the following macro to copy a cell from sheets("DB").Select
and paste it to a cell in another sheet.
Code:
Dim ws As Worksheet
For Each ws In Worksheets
With ws
Select Case .Name
Case "Sheet3", "Sheet4", "Sheet5", "Sheet6", "Sheet7", "Sheet8", "Sheet9", "Sheet10", "Sheet11"
Sheets("DB").Select
[COLOR=Red]Range("A1").Copy[/COLOR]
ws.Select
Range("B3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Select
End With
Next
So instead of copy-paste same cell ("A1") every time
Macro will select different cell. (A2, A3, A4 etc')
Something like Range("A" & i).Select, maybe.
I'm not sure how to create the loop for the macro to select the next cell to copy-paste.
Hope you can help.
Many thanks,
Amit.