View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone[_2_] Jim Cone[_2_] is offline
external usenet poster
 
Posts: 1,549
Default Paste failing after cut

..End(xlDown) provides the same action as pressing the Ctrl key while tapping the down arrow key
once.

So this should work for you...
'Syntax is: 'Range(TopLeftCell, BottomRightCell)
Range(Range("A2"), Range("P2").End(xlDown)).Select
'---

If it were my code, I would have it set up something like this...

Dim MyRng As Range
Dim LastCol As Long
LastCol = ConvertColumnLetterToNumber(gPictColumn)
With Sheets("SomeName")
Set MyRng = .Range(.Range("A2"), .Cells(.Rows.Count, LastCol).End(xlUp))
End With
MyRng.AutoFilter
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware
(free and commercial excel programs)





"stainless"
wrote in message
...
Just need to correct a sentence:

In this worksheet, I know that the LAST populated column is column
"P"...."