Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
application.match and value problem | Excel Discussion (Misc queries) | |||
Office application version does not match. | Excel Discussion (Misc queries) | |||
How do I set up Data entry to match My Application Form | Excel Discussion (Misc queries) | |||
application.match | Excel Discussion (Misc queries) | |||
Application.WorksheetFunction.Match problem | Excel Worksheet Functions |