Copying specific cells
Closed
andrewrp1
Posts
1
Registration date
Thursday September 20, 2018
Status
Member
Last seen
September 20, 2018
-
Updated on Sep 20, 2018 at 05:24 PM
Blocked Profile - Sep 20, 2018 at 05:12 PM
Blocked Profile - Sep 20, 2018 at 05:12 PM
1 response
You are correct, you hard code the relationship in the placement of the entry.
Or, you could build a multideminsional array like:
and loop through each element in the array, parsing the "to" and "from" cells from the array entries. Now just build a loop from 1 to how ever many numbers of entries there are, and loop it!
Thecellvalue = ThisWorkbook.Worksheets(WSA).Range("G2").value
ThisWorkbook.Worksheets(WSB).Select
ThisWorkbook.Worksheets(WSB).Range("J9").value = ThecellValue
Or, you could build a multideminsional array like:
cellvalue(0)="G2,J9"
cellvalue(1)="G3,J8"
cellvalue(2)="G1,J12"
and loop through each element in the array, parsing the "to" and "from" cells from the array entries. Now just build a loop from 1 to how ever many numbers of entries there are, and loop it!