1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel 2007 - need to compare TWO cells to determine a value for the current cell...

Discussion in 'Business Applications' started by drakesteele, Aug 29, 2008.

Thread Status:
Not open for further replies.
Advertisement
  1. drakesteele

    drakesteele Thread Starter

    Joined:
    Aug 29, 2008
    Messages:
    3
    How can I do it?

    I basically need THIS to work, but I can't compare two items in the same if apparenlty...

    =IF(K12>2400 and K13=0,2400,K12)

    I am comparing the totals of daily hours to see if regular hours ended up over 40 (2400 minutes) and whether or not the daily overtime is still zero before I use the regular hours to figure overtime in a timecard system.

    Unfortunately that won't work, nor does using & beween because then it concatenates it and always ends up false. :(

    Help!

    - Drake.
     
  2. drakesteele

    drakesteele Thread Starter

    Joined:
    Aug 29, 2008
    Messages:
    3
    LOL well nevermind. With a lil more thought, I solved my own issue.

    It takes a NESTED if.

    =IF(K13=0,IF(K12>2400,2400,K12),K12)

    That did the job flawlessly.

    Thanks anyway!

    - Drake.
     
  3. Aj_old

    Aj_old

    Joined:
    Sep 24, 2007
    Messages:
    869
    Drake if you wanna a check for more than one criteria then you can use AND function if you wanna all to be satisfied or the OR function you need any of them to be true, so your function should look like:
    =IF(AND(K12>2400,K13=0),2400,K12)
     
  4. drakesteele

    drakesteele Thread Starter

    Joined:
    Aug 29, 2008
    Messages:
    3
    Thanks... didn't even think to check for AND as a function. So used to the way AND works in programming languages that when it no longer worked that way I was stumped... tho the nested if did work with no problem.

    Thanks again,

    Drake.
     
  5. Aj_old

    Aj_old

    Joined:
    Sep 24, 2007
    Messages:
    869
    It's you choice
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/745145

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice