copying value into alphanumeric table

  • Thread starter Thread starter Tre_cool
  • Start date Start date
T

Tre_cool

Hi,
I've spent hours trying to work this out and I can't get it. I nee
some help to copy a value and grid location into a table in anothe
worksheet. For example, in one worksheet I have in one cell, the tabl
location (i.e C3), and in another cell a number (ie. 1234). On a secon
sheet, I have a table and I would like it to copy 1234 into tabl
location, C3. Note, on the first sheet the number and table locatio
values are changing (table location is a manual input). Eventually,
would enter many grid locations in sheet1 and a corresponding valu
appears in the second cell and then I would like a macro that will fil
in the table in sheet2.


Eg.
Sheet1 Sheet2
A B C A B C
1 C3 1
2 1234 2
3 3 (wan
1234 to copy here)
4 4
5 5


Thanks in advance!
Trevo
 
Sub UpdateTable()
Dim rng as Range, cell as Range
With Worksheets("sheet1")
set rng = .Range(.Cells(1,1),.Cells(1,1).End(xldown))
End With
for each cell in rng
worksheets("Sheet2").Range(cell.Value).value = _
cell.offset(0,1).Value
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top