Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 --------------- Jacob Skaria "Tami" wrote: 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 |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Worked! thanks much!!
(p.s. if you get a chance, i have an unanswered question out there called "Edit Replace String") thx again tami "Jacob Skaria" wrote: 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 --------------- Jacob Skaria "Tami" wrote: 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copying to a range | Excel Discussion (Misc queries) | |||
Copying a named range with a changing cell reference | New Users to Excel | |||
Copying cell with input range to different worksheet | Excel Worksheet Functions | |||
Copying a formula that contains a range of cell rows | Excel Discussion (Misc queries) | |||
Naming cell ranges, copying formulas for a range & nesting "IF" fu | Excel Discussion (Misc queries) |