copying cell to a range

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
 
J

Jacob Skaria

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
 
T

Tami

Worked! thanks much!!
(p.s. if you get a chance, i have an unanswered question out there called
"Edit Replace String")
thx again
tami
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top