PC Review


Reply
Thread Tools Rate Thread

Can't find certain date in search

 
 
Ken
Guest
Posts: n/a
 
      30th Jun 2008
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
 
Reply With Quote
 
 
 
 
Fred Smith
Guest
Posts: n/a
 
      1st Jul 2008
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" <(E-Mail Removed)> wrote in message
news:cefca626-8019-44ae-9d7a-(E-Mail Removed)...
> 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


 
Reply With Quote
 
Ken
Guest
Posts: n/a
 
      1st Jul 2008
On Jun 30, 7:08*pm, "Fred Smith" <fsmit...@yahooo.com> 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" <kthac...@btes.tv> wrote in message
>
> news:cefca626-8019-44ae-9d7a-(E-Mail Removed)...
>
>
>
> > 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 With Quote
 
Fred Smith
Guest
Posts: n/a
 
      1st Jul 2008
Glad to help. Thanks for your feedback.

Fred.

"Ken" <(E-Mail Removed)> wrote in message
news:1e5d808d-7ab6-4d71-afb9-(E-Mail Removed)...
On Jun 30, 7:08 pm, "Fred Smith" <fsmit...@yahooo.com> 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" <kthac...@btes.tv> wrote in message
>
> news:cefca626-8019-44ae-9d7a-(E-Mail Removed)...
>
>
>
> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Instant Search, Advanced Find, Search Folders, and Windows Desktop Excel@shoenfeltconsulting.com Microsoft Outlook 2 31st Oct 2008 06:37 PM
Find sequence of words in Search Folder: Custom Search? ron.angus Microsoft Frontpage 1 4th Jun 2008 09:50 PM
Search Companion text search folder doesn't find all files JBond007 Windows XP Help 1 16th May 2008 06:48 PM
Find/Search in Formulas - won't find phrase after copying/renaming sheet/book GR Microsoft Excel Discussion 1 31st Jan 2006 10:22 PM
Given a date, how to find the beginning date and ending date of that week Matt Microsoft ASP .NET 1 8th Nov 2003 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:35 PM.