pete_s
04-23-2008, 08:13 PM
i want to take a value of a merged cell and expand that same value to each adjacent cell.
how do i get the variable b into the ActiveCell.Formula command? Is this possible?
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
For a = 1 To 11
b = -1
Range("B" & a).Select
ActiveCell.Formula = "=R[0]C[-1]"
Do While ActiveCell = 0
ActiveCell.Formula = "R[b]C[-1]" ' Here is my problem
b = b - 1
Loop
how do i get the variable b into the ActiveCell.Formula command? Is this possible?
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
For a = 1 To 11
b = -1
Range("B" & a).Select
ActiveCell.Formula = "=R[0]C[-1]"
Do While ActiveCell = 0
ActiveCell.Formula = "R[b]C[-1]" ' Here is my problem
b = b - 1
Loop