+ Reply to Thread
Results 1 to 2 of 2

Compare 2 cells values with one IF statement

  1. #1
    jbsand1001
    Guest

    Compare 2 cells values with one IF statement

    I am trying to find out if it is possible to comapre 2 cells with one of the
    cells I having 2 different values to compare. For example

    I am need for it to look in J2 and say if J2= 20 it will add 136 but if J2 =
    40 it will add 165.


    below is what I have so far but I am trying to find out if it can look at a
    second argument in j2?
    =IF(B2="something",J2+136,M2+0)


    Any guidance would be greatly appreciated.

    Judd



  2. #2
    Gary's Student
    Guest

    RE: Compare 2 cells values with one IF statement

    In your formula, try replacing
    J2+136
    With
    (J2=20)*136+(J2=40)*165

    This should return the correct value and return zero if J2 does not equal
    either 20 or 40.

    --
    Gary's Student


    "jbsand1001" wrote:

    > I am trying to find out if it is possible to comapre 2 cells with one of the
    > cells I having 2 different values to compare. For example
    >
    > I am need for it to look in J2 and say if J2= 20 it will add 136 but if J2 =
    > 40 it will add 165.
    >
    >
    > below is what I have so far but I am trying to find out if it can look at a
    > second argument in j2?
    > =IF(B2="something",J2+136,M2+0)
    >
    >
    > Any guidance would be greatly appreciated.
    >
    > Judd
    >
    >


+ 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