Thread
:
macro problem: range offset question
View Single Post
#
7
Posted to microsoft.public.excel.misc
lacy
external usenet poster
Posts: 11
macro problem: range offset question
i think i'm good. did something simpler. thanks!
Range(Range("L2"), Range("L2").End(xlDown)).Offset(0,1).Copy
"Don Guillett" wrote:
I think?? this is what you may want. Notice the DOTS and their placement.
sub copycolW()
With Sheets("hello")
.Range(.Range("l2"), .Range("l2").End(xlDown)).Offset(, 11).Copy
Sheets("solong").Cells(Rows.Count, "b").End(xlUp).Offset(1) _
.PasteSpecial Paste:=xlPasteValues
End With
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"lacy" wrote in message
...
Dim myRange As Range
ActiveWorkbook.Sheets("hello").Select
Range("L2").Select
myRange = Range(Selection, Selection.End(xlDown)).Select
myRange2 = myRange.Offset(0, 11)
myRange2.Select
Selection.Copy
Sheets("solong").Select
Range("b101000").Select
Selection.End(xlUp).Select
Selection.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
the problem is that the macro is falling over with the range in column L
selected. the offset selection is not made. is there a problem with the
sytax? thanks!!
Reply With Quote
lacy
View Public Profile
Find all posts by lacy