Using cell contents ae address

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

I have 2 colums that contain a value in the first column
and an address in the cells of the second column. The
address is in R1C1 format. I want to write VB/excel macro
that reads the contents of the address cell, goes to that
address and pastes the associated value in the new cell.
How do I do this?
 
Assume data to be copie is in column a and R1C1 formatted addresses are
strings in Column B (rows 1 to 200)
for each cell in Range("B1:B200")
sVal = cell.Text
cell.FormulaR1C1 = "=" & sVal
set rng = cell.DirectDependents
rng.value = cell.offset(0,-1).Value
cell.Value = sVal
Next
 
Back
Top