+ Reply to Thread
Results 1 to 4 of 4

formula result different form manual imput

  1. #1
    Registered User
    Join Date
    09-25-2009
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    51

    formula result different form manual imput

    Hello,

    I have the following formula:
    =IF(OR(C5="B";C5="M";C5="Î";C5="N";C5="CO";C5="D");TEXT("-";IF((D5-C5)>I2;(D5-C5-$I$2);"-"))

    The problem is in this part:IF((D5-C5)>I2;(D5-C5-$I$2);"-")

    If in I2 cell I manualy type: "08:30:00" everyting is fine and the formula works.
    But if I get 08:30:00 from this formula:
    =IF(WEEKDAY(C2;2)=5; "06:00:00"; "08:30:00")
    The first formula is evaluated as fase.

    I cannot understand where i made the mistake.

    Attached is an example of the problem. In I2 cell the formula is not working for the F5 cell, but if you will remove the I2 formula and type the same by hand, F5 formula will work.
    Attached Files Attached Files
    Last edited by alexandruc; 09-29-2009 at 10:04 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formula result different form manual imput

    Try changing this formula:

    =IF(WEEKDAY(C2;2)=5; "06:00:00"; "08:30:00")

    to

    =IF(WEEKDAY(C2;2)=5; "06:00:00"+0; "08:30:00"+0)

    and format as time, if required.

    The +0 coerces the text string as a number...
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-25-2009
    Location
    Romania
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: formula result different form manual imput

    Thanks a lot. That did it!

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formula result different form manual imput

    Please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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