+ Reply to Thread
Results 1 to 7 of 7

my if formula isnt working

  1. #1
    Forum Contributor
    Join Date
    06-21-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    200

    my if formula isnt working

    Part 1

    I would've thought this formula is easy but its not working! Hope someone can advise.

    A1 = 50%
    A2 = 60%
    A3 = 110%

    Formula - if(A1>=100% & A2>=100% & A3>=100%, "YES", "NO")

    I would expect to get a NO from this, but I'm getting a Yes. Why??




    Part 2

    in the above range of A1:A3 if there's 1 # >=100% I want the result to say '1', 2 then '2', 3 then '3'. I would do this thru a really long if then else formula but I'm guessing there's a simpler way?



    Thanks!
    Dan

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: my if formula isnt working

    try this...

    if(and(A1>=100%,A2>=100%,A3>=100%), "YES", "NO")
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    06-21-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: my if formula isnt working

    awesome that worked! thanks!
    i dont get what's wrong w/ putting an & sign tho? i mean i can see its not working but not getting the logic. is it just something that i need to accept or is there a mistake im making here?

    also do you knwo the answer to part 2?

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: my if formula isnt working

    Its something you have to accept...its the syntax for an and() statement, thats just the way it works

    What are the chances that for instance, the values could be 130% 180% 30%?

  5. #5
    Forum Contributor
    Join Date
    06-21-2009
    Location
    Toronto, Ontario
    MS-Off Ver
    Excel 2007
    Posts
    200

    Re: my if formula isnt working

    Quote Originally Posted by FDibbins View Post
    Its something you have to accept...its the syntax for an and() statement, thats just the way it works

    What are the chances that for instance, the values could be 130% 180% 30%?
    im not sure i understand the second part of your question. this was sample data, not actual results, so the chances are whatever you'd want them to be actually. this was the last question in an excel test given to me for a job today.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: my if formula isnt working

    my reason for asking, was that I thought of changing your formula to something like...
    =ROUNDDOWN(SUM(A1:A3),0)

    but if the values were something like I suggested, that would not work

  7. #7
    Registered User
    Join Date
    06-16-2011
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: my if formula isnt working

    Are you wanting to count how many of the cells are above 100%?

    =COUNTIF(A1:A3,">100%")

+ 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