#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"