View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Change date format in string?

I have a macro which AutoFilters a date column. The spreadsheet is now
being created differently, and the dates are coming up in a different
format. Currently, I have
If MyTarget = "d" Then
Selection.AutoFilter Field:=5, Criteria1:="=20020703", _
Operator:=xlAnd, Criteria2:="<=20030616"
End If

Is there any way to change these dates to "03-Jul-02" on the fly? Or do I
need to go into the macro and redo the date for every If?

Ed