Thread: Excel
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jane Pratt [MSFT] Jane Pratt [MSFT] is offline
external usenet poster
 
Posts: 4
Default Excel

Hi Craig

How about something like this:
Sub test()
Dim DataCell As Range
Dim RangeCell As Range

For Each DataCell In Range("A1:A3")
Set RangeCell = DataCell.Offset(0, 1)
Range(RangeCell).Value = DataCell.Value
Next

End Sub

This obviously assumes that the ranges A1:A3 contain your data and B1:B3
contains the corresponding addresses where you would like to insert the
values.

Hope this helps!

Regards
Jane Pratt
Developer Tools Support
Microsoft UK

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.