Thread: Sort Macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Sort Macro

why are your sorting?

Sub Macro12()
set c = range("F6:F15").find(what:=F5, _
lookin:=xlvalues,lookat:=xlwhole)
if c is nothing then
Range("A6:F15").clearcontenets
end if
end Sub

"Sue" wrote:

Hi
Can you help with my sort macro below,

If nothing in the range F6:F15 does not equal the value of F5 then clear the
contents of A6:F15

Sub Macro12()
Sheets("OB;In;Av").Select
Range("A5:F15").Select
Selection.Sort Key1:=Range("F5"), Order1:=xlDescending,
Key2:=Range("E5") _
, Order2:=xlDescending, Header:=xlNo, OrderCustom:=1,
MatchCase:=False End Sub

--
Many Thanks

Sue