Hi - I am using MS XL 2002 and I have created a macro that inputs data
to a specific cell. I want the macro to input this data in a range of
cells; the data should be input into all the same row cells in column
A, providing there is data in the same rows in Column B.
For example, it should look at column B, realize that there is data in
all cells B2:B121 and input the data into cells A2:A121 I am not
concerned with the inputting of the data, it is specifying the range of
cells to be affected that I am having trouble with.
Hope that is clear enough......
Thanks!
Alan
Gary''s Student - 07 Nov 2006 19:06 GMT
Sub demo()
Dim r As Range, rr As Range
v = 123.456
Set r = Range("A:A")
For Each rr In r
If IsEmpty(rr.Offset(0, 1)) Then
Else
rr.Value = v
End If
Next
End Sub
This little routine travels down column A putting in a value if the neighbor
in column B is not empty.

Signature
Gary''s Student
> Hi - I am using MS XL 2002 and I have created a macro that inputs data
> to a specific cell. I want the macro to input this data in a range of
[quoted text clipped - 11 lines]
>
> Alan
Alan - 08 Nov 2006 03:18 GMT
Thank you so much for the help! I plugged it in and voila' - works
great!
- Alan
> Sub demo()
> Dim r As Range, rr As Range
[quoted text clipped - 29 lines]
> >
> > Alan