Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Vergel,
I am at the tail end of a project and have posted a couple of questions, this being one of them. I have searched the web and read books trying to resolve this puzzle. Your code works exactly as I had hoped for. I know it's relative, but to me, this is genius. Cheers mate! "Vergel Adriano" wrote: Steve, Maybe something like this: Sub test() Dim c As Range Dim rngCopy As Range If TypeName(Selection) = "Range" Then For Each c In Selection If rngCopy Is Nothing Then Set rngCopy = Range("K" & c.Row & ":" & "M" & c.Row) Else Set rngCopy = Application.Union(rngCopy, Range("K" & c.Row & ":" & "M" & c.Row)) End If Next c rngCopy.Copy End If End Sub -- Hope that helps. Vergel Adriano "Steve" wrote: I am using the ActiveCell.Row to copy and paste cell content. Range("K" & ActiveCell.Row & ":" & "M" & ActiveCell.Row).Copy It allows the user to perform certain functions without being concerned about which columns to select. Many times they will be selecting multiple rows. Is there a modification to this routine that allows for the selection of multiple or noncontiguous rows? Thanks, Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
I want to add more that 30 noncontiguous cells in Excel | Excel Worksheet Functions | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
How to Revert to ActiveCell.Formula = format from ActiveCell.FormulaR1C1 = format | Excel Programming | |||
Noncontiguous rows | Excel Discussion (Misc queries) | |||
noncontiguous cells | Excel Discussion (Misc queries) |