copying cell to a range

  • Thread starter Thread starter Tami
  • Start date Start date
T

Tami

In my macro, i identify the active cell address, row# and column #
L=activecell.row
in this example assume the active cell address is D20
then i need to copy that cell to AC20:BB:20 and BF20:BZ20
(if i was on D30, I would be copying to AC30:BB:30 and BF30:BZ20, etc)
i'm having trouble writing the range part with the colon.

do i make a string using ampersands? Range=("AC"&L&":BB:"&L).select?
thanks in advance!
tami
 
Dim lngRow As Long
lngRow = ActiveCell.Row
ActiveCell.Copy Range("AC" & lngRow & ":BB" & _
lngRow & ",BF" & lngRow & ":BZ" & lngRow)

PS: There are other ways to refer a range. Check out help on Range.Resize

If this post helps click Yes
 
Worked! thanks much!!
(p.s. if you get a chance, i have an unanswered question out there called
"Edit Replace String")
thx again
tami
 
Back
Top