LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Application.Match with Times

I've been at this problem for a while now, and could not find any guidance
in previous posts.

I have a range 6 X 10 of times that coorespond to a schedule.
Start Break MealStart MealStop Break End
10:30 AM 12:00 PM 2:30 PM 3:30 PM 5:00 PM 7:00 PM

I then have a single row of times from midnight to 11:45 PM, in incriments
of 15 minutes.
12:00 AM 12:15 AM 12:30 AM 12:45 AM 1:00 AM etc

I am writing a macro that will iterate cell by cell through the schedule
times and return the cooresponding column number matching the time in the
single row (range named as "times").

Dim rng as Range
Dim TimeToFind as Double
Dim res as Variant
Dim CurRow, CurCol as Integer

CurCol = 1
CurRow = 1
Set rng = Range("times")
TimeToFind = CDbl(Cells(CurRow, CurCol))
res = Application.Match(TimeToFind, rng, 0)

Certain times are not being found, despite that they are clearly there! It
has no trouble finding 10:30 AM (serial: 0.4375), or 12:00 PM (serial: 0.5).
It pukes on 2:30 PM.

Can anyone shed some light on this or point me in the right direction?
Thanks for your assistance!


 
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
application.match and value problem Cbrehm Excel Discussion (Misc queries) 0 February 12th 11 04:34 PM
Office application version does not match. Joy Excel Discussion (Misc queries) 0 February 16th 09 01:22 PM
How do I set up Data entry to match My Application Form Mr. Ziggy Excel Discussion (Misc queries) 10 April 6th 06 06:46 PM
application.match Chip Smith Excel Discussion (Misc queries) 3 March 30th 06 08:56 PM
Application.WorksheetFunction.Match problem Carl Brehm Excel Worksheet Functions 1 January 9th 05 02:08 PM


All times are GMT +1. The time now is 04:05 AM.

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

About Us

"It's about Microsoft Excel"