Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Can't find certain date in search

Hi Group,
It's me again....just got a quick question about a date search. I am
running a macro that I can enter a date in an input box, and then ask
it to search for every date on my log that fits a criteria pertaining
to that date.....
It will find every date that it is supposed to, i.e. < search date,
except ANY dates prior to Oct 1, 2007...(format is 10/1/2007).....I
have changed the dates to text to check to see if dates prior to that
have the correct numerical format, and they do. Now if I change the
macro to search date, the dates prior to Oct 1, 2007 show up along
with all the other dates that are actually search date. Has anyone
ran into this type of problem, and is there anyway to correct it?
Thanks to all!
Ken
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Can't find certain date in search

It would help if you posted the code for your search. However, I suspect the
problem is "changed the dates to text". In text, January and October start
with the same number, so searching by text dates will always be problematic.
In your example, the text string 10/1/2007 comes *before* the string
2/10/2007.

Search by real Excel dates. Then you won't have this problem.

Regards,
Fred.

"Ken" wrote in message
...
Hi Group,
It's me again....just got a quick question about a date search. I am
running a macro that I can enter a date in an input box, and then ask
it to search for every date on my log that fits a criteria pertaining
to that date.....
It will find every date that it is supposed to, i.e. < search date,
except ANY dates prior to Oct 1, 2007...(format is 10/1/2007).....I
have changed the dates to text to check to see if dates prior to that
have the correct numerical format, and they do. Now if I change the
macro to search date, the dates prior to Oct 1, 2007 show up along
with all the other dates that are actually search date. Has anyone
ran into this type of problem, and is there anyway to correct it?
Thanks to all!
Ken


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 45
Default Can't find certain date in search

On Jun 30, 7:08*pm, "Fred Smith" wrote:
It would help if you posted the code for your search. However, I suspect the
problem is "changed the dates to text". In text, January and October start
with the same number, so searching by text dates will always be problematic.
In your example, the text string 10/1/2007 comes *before* the string
2/10/2007.

Search by real Excel dates. Then you won't have this problem.

Regards,
Fred.

"Ken" wrote in message

...



Hi Group,
*It's me again....just got a quick question about a date search. I am
running a macro that I can enter a *date in an input box, and then ask
it to search for every date on my log that fits a criteria pertaining
to that date.....
* It will find every date that it is supposed to, i.e. < search date,
except ANY dates prior to Oct 1, 2007...(format is 10/1/2007).....I
have changed the dates to text to check to see if dates prior to that
have the correct numerical format, and they do. Now if I change the
macro to search date, the dates prior to Oct 1, 2007 show up along
with all the other dates that are actually search date. Has anyone
ran into this type of problem, and is there anyway to correct it?
Thanks to all!
Ken- Hide quoted text -


- Show quoted text -


Hi Fred,
Thanks for your answer.... After giving it further thought as I
typed this in, my column for the search is in the correct excel date
format, but my search value WAS a string, not date, so I changed to
"Dim LSearchValue As Date" instead of String, and voila!...it is
correct! Thanks Fred for your help!
Ken
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Can't find certain date in search

Glad to help. Thanks for your feedback.

Fred.

"Ken" wrote in message
...
On Jun 30, 7:08 pm, "Fred Smith" wrote:
It would help if you posted the code for your search. However, I suspect
the
problem is "changed the dates to text". In text, January and October start
with the same number, so searching by text dates will always be
problematic.
In your example, the text string 10/1/2007 comes *before* the string
2/10/2007.

Search by real Excel dates. Then you won't have this problem.

Regards,
Fred.

"Ken" wrote in message

...



Hi Group,
It's me again....just got a quick question about a date search. I am
running a macro that I can enter a date in an input box, and then ask
it to search for every date on my log that fits a criteria pertaining
to that date.....
It will find every date that it is supposed to, i.e. < search date,
except ANY dates prior to Oct 1, 2007...(format is 10/1/2007).....I
have changed the dates to text to check to see if dates prior to that
have the correct numerical format, and they do. Now if I change the
macro to search date, the dates prior to Oct 1, 2007 show up along
with all the other dates that are actually search date. Has anyone
ran into this type of problem, and is there anyway to correct it?
Thanks to all!
Ken- Hide quoted text -


- Show quoted text -


Hi Fred,
Thanks for your answer.... After giving it further thought as I
typed this in, my column for the search is in the correct excel date
format, but my search value WAS a string, not date, so I changed to
"Dim LSearchValue As Date" instead of String, and voila!...it is
correct! Thanks Fred for your help!
Ken

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
search or find, and extract? SusanInTexas Excel Discussion (Misc queries) 1 August 24th 07 10:20 PM
Search and Find Macro Brian Hearty via OfficeKB.com Excel Discussion (Misc queries) 1 October 31st 05 08:30 AM
Cells.Find , why it DOESN'T search ? help Andrzej New Users to Excel 1 May 22nd 05 02:42 PM
Can Search find 2 or more "/"? Wind54Surfer Excel Discussion (Misc queries) 2 February 22nd 05 04:31 PM
How do I use "find" to search whole workbook? Sholtzy Excel Discussion (Misc queries) 2 January 14th 05 12:51 AM


All times are GMT +1. The time now is 11:13 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"