Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel
If i have a number in a cell and then want to place that
number in another cell, which will be determined by a number put in another cell. EG A2 = 1200 (Inputted value), need to put this number (1200) in cell E1. This cell number is determined by number put into cell A3 (5). |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|