Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Date format is not picked up correctly while filtering

In Excel Macros I have taken date format as DD-MMM-YY and assigned to a
variable and same picked up variable for filtering it is not possible to
filter?? Can anybody help me out ..... Please.........
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Date format is not picked up correctly while filtering

Try this instead

Dim sDate As String

sDate = Format(Date,"dd-mmm-yy")
Selection.AutoFilter Field:=1, Criteria1:="<=" & sDate

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Vijay Kotian" wrote in message
...
In Excel Macros I have taken date format as DD-MMM-YY and assigned to a
variable and same picked up variable for filtering it is not possible to
filter?? Can anybody help me out ..... Please.........



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot get date to format correctly jknapp1005 Excel Discussion (Misc queries) 1 May 28th 10 05:40 PM
how do I sort by picked-up date in Excel equipment repair Excel Worksheet Functions 1 April 1st 10 05:21 PM
Date format in Excel 2007 mm/dd/yy not appearing correctly RickGCR Excel Worksheet Functions 2 January 6th 09 01:07 AM
why won't my cells format correctly? shannonc80 Excel Worksheet Functions 5 January 19th 07 12:34 AM
MY SPREADSHEET IS NOT FILTERING CORRECTLY leighanne Excel Discussion (Misc queries) 1 April 18th 05 12:48 PM


All times are GMT +1. The time now is 02:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"