Results 1 to 5 of 5

Inconsistent results while comparing time

Threaded View

  1. #1
    Registered User
    Join Date
    04-10-2009
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2003
    Posts
    3

    Inconsistent results while comparing time

    I've got a formula that returns inconsistent results. The point behind the formula is to produce a graphical representation of a schedule. The problem is that some of the time the formula does not show lunches or shifts correctly. If the person is scheduled for 30 min, the "graph" shows 1 to 3 "L" responses depending on what time the lunch is scheduled to start/end (CC4 and BY6 are the odd results). It will do the same for 1hr lunches that start/end at the right (wrong?) time. The "graph" also shows the some shifts ending 1 cell early (cell CK4). The "graph" schedule is broken out in 15 min increments of time. The attached file is an example of the schedule (only 4 lines of the schedule). The file is built and used in Excel '07

    The formula is supposed to return 1 of 4 results.
    1. nothing displayed in the cell (the person is not working at that time)
    2. "B" (the person is on "Break")
    3. "L" ( the person is on "Lunch") and finally
    4. "X" (the person is working at that time)

    The formula is as follows (see the attached file in cell CB4):
    =IF(OR(TEXT($DE4,"h:mm")=TEXT(CB$8,"h:mm"),TEXT($DI4,"h:mm")=TEXT(CB$8,"h:mm"),TEXT($DJ4,"h:mm")=TEXT(CB$8,"h:mm")),"B",IF(AND(CB$8>=$DF4,CB$8<$DH4),"L",IF(AND(CB$8>=$J4,CC$8<$L4),"X","")))
    Here's how it's broken down

    **this part figures out IF it's break time (if true it shows "B")**
    =IF(OR(TEXT($DE4,"h:mm")=TEXT(CB$8,"h:mm"),TEXT($DI4,"h:mm")=TEXT(CB$8,"h:mm"),TEXT($DJ4,"h:mm")=TEXT(CB$8,"h:mm")),"B"

    **ELSE it looks IF it's lunch time (if true it shows "L")**
    IF(AND(CB$8>=$DF4,CB$8<$DH4),"L",

    **ELSE it looks IF the person is even working at the time (if true it shows "X", but if false it shows nothing)
    IF(AND(CB$8>=$J4,CC$8<$L4),"X","")))

    All start/stop/break times are compared against a time in row 8 to work the calculation against.

    How can a rebuild the formula to get consistent results regardless of start/stop times for the lunches? Or is there an easier way to get the same results?
    Attached Files Attached Files
    Last edited by dpwusr; 04-10-2009 at 01:03 PM. Reason: issue resolved

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1