View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
RocketMan[_2_] RocketMan[_2_] is offline
external usenet poster
 
Posts: 19
Default Probably too easy...change range to be one row down.

final code that works...just for reference:

Sub Alpha_Click()

Dim FirstCell As Range
Dim LastCell As Range
Dim SortRange As Range

Set FirstCell = ActiveSheet.Cells.Find(What:="Pills", After:=[A4],
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False)

Set LastCell = ActiveSheet.Range("A65536").End(xlUp)
Set SortRange = Range(FirstCell.Offset(1, 0), LastCell.Offset(0, 5))
SortRange.Sort Key1:=FirstCell

End Sub