+ Reply to Thread
Results 1 to 4 of 4

Very strange error

  1. #1
    Registered User
    Join Date
    12-08-2005
    Posts
    84

    Very strange error

    Hiya guys and gals

    I have the following piece of code;

    =IF((E$2>=$B6)*(E$2<=$D6),1,)

    Cells E2:AZ2 contain time (00:30,01:30,02:00 and so on)

    So the code will work as follows, if E2 is greater than or equal to B6, an employees start time, but less than or equal to D6, an employees finish time, then current cell =1.

    Now this works fine from 03:00 onwards, but before this time it seems to take away thirty mins. For example if an employees start time is 02:00 the first "1" will be in the 02:30 box! Like i said after 03:00 the program works perfectly i just cannot seem to understand what the problem is.

    Any help will be greatly appriciated.

    Cheers

    James

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello James,

    E-mail your workbook and let me see what you did.

    Sincerely,
    Leith

  3. #3
    Registered User
    Join Date
    12-08-2005
    Posts
    84
    Hi Leith

    Just mailed it

    Many Thanks

    James

  4. #4
    Roger Govier
    Guest

    Re: Very strange error

    Hi

    Try re-typing the value 2:00 in cell H2
    I can re-create your problem if I type 1:59:59.59 in H2. It displays as
    2:00 but obviously it's internal value is less than 2:00 hence the test
    fails.

    --
    Regards

    Roger Govier


    "superkopite" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hiya guys and gals
    >
    > I have the following piece of code;
    >
    > =IF((E$2>=$B6)*(E$2<=$D6),1,)
    >
    > Cells E2:AZ2 contain time (00:30,01:30,02:00 and so on)
    >
    > So the code will work as follows, if E2 is greater than or equal to
    > B6,
    > an employees start time, but less than or equal to D6, an employees
    > finish time, then current cell =1.
    >
    > Now this works fine from 03:00 onwards, but before this time it seems
    > to take away thirty mins. For example if an employees start time is
    > 02:00 the first "1" will be in the 02:30 box! Like i said after 03:00
    > the program works perfectly i just cannot seem to understand what the
    > problem is.
    >
    > Any help will be greatly appriciated.
    >
    > Cheers
    >
    > James
    >
    >
    > --
    > superkopite
    > ------------------------------------------------------------------------
    > superkopite's Profile:
    > http://www.excelforum.com/member.php...o&userid=29496
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=514073
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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