View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
El Bee
 
Posts: n/a
Default Sort : how can I use a variable in a VB sort function?

If I create a variable and call it End_date how can I use it in the sort
function?
I want to replace the "02/26/06" value with this variable. I've tried just
replacing it with Cells.Find(What:=End_date,..... and it fails. I've also
tried placing it in brackets and that fails too.

Cells.Find(What:="02/26/06", After:=ActiveCell, LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate