+ Reply to Thread
Results 1 to 7 of 7

Comparison Function

  1. #1
    Michael
    Guest

    Comparison Function

    Hi Folks - I have the follwoing data:

    Col A Col B Col C
    45 50 Increase
    60 75 Increase
    65 50 Decrease
    44 44 Same

    Is there a function I can use in Col C to determine if a cell value
    increased, decreased or stayed the same? Thanks in advance.

    Michael








  2. #2
    JulieD
    Guest

    Re: Comparison Function

    Hi Michael

    one way
    =IF(OR(ISBLANK(B1),ISBLANK(A1)),"",IF(B1=A1,"Same",IF(B1-A1>0,"Increase","Decrease")))

    this only puts the words in if both A1 & B1 have data in them

    Cheers
    julieD



    "Michael" <[email protected]> wrote in message
    news:wutId.20293$B95.14346@lakeread02...
    > Hi Folks - I have the follwoing data:
    >
    > Col A Col B Col C
    > 45 50 Increase
    > 60 75 Increase
    > 65 50 Decrease
    > 44 44 Same
    >
    > Is there a function I can use in Col C to determine if a cell value
    > increased, decreased or stayed the same? Thanks in advance.
    >
    > Michael
    >
    >
    >
    >
    >
    >
    >




  3. #3
    Aladin Akyurek
    Guest

    Re: Comparison Function

    Also...

    =LOOKUP(A2-B2,{-9.99999999999999E+307,0,2.229E-308},{"Decrease","Same","Increase"})

    Michael wrote:
    > Hi Folks - I have the follwoing data:
    >
    > Col A Col B Col C
    > 45 50 Increase
    > 60 75 Increase
    > 65 50 Decrease
    > 44 44 Same
    >
    > Is there a function I can use in Col C to determine if a cell value
    > increased, decreased or stayed the same? Thanks in advance.
    >
    > Michael
    >
    >
    >
    >
    >
    >
    >


  4. #4
    Jason Morin
    Guest

    Re: Comparison Function

    In addition to Julie's formula, you could use:

    =CHOOSE((B1>A1)+1+(A1=B1)*2,"Decrease","Increase","Same")

    However, mine does not take into consideration blanks - I
    suppose you could add an IF in there.

    HTH
    Jason
    Atlanta, GA

    >-----Original Message-----
    >Hi Folks - I have the follwoing data:
    >
    >Col A Col B Col C
    >45 50 Increase
    >60 75 Increase
    >65 50 Decrease
    >44 44 Same
    >
    >Is there a function I can use in Col C to determine if a

    cell value
    >increased, decreased or stayed the same? Thanks in

    advance.
    >
    >Michael
    >
    >
    >
    >
    >
    >
    >
    >.
    >


  5. #5
    Michael
    Guest

    Re: Comparison Function

    Julie - Thanks. I understand your example the best. Thanks to all!!

    Michael



    "JulieD" <[email protected]> wrote in message
    news:%[email protected]...
    > Hi Michael
    >
    > one way
    >

    =IF(OR(ISBLANK(B1),ISBLANK(A1)),"",IF(B1=A1,"Same",IF(B1-A1>0,"Increase","De
    crease")))
    >
    > this only puts the words in if both A1 & B1 have data in them
    >
    > Cheers
    > julieD
    >
    >
    >
    > "Michael" <[email protected]> wrote in message
    > news:wutId.20293$B95.14346@lakeread02...
    > > Hi Folks - I have the follwoing data:
    > >
    > > Col A Col B Col C
    > > 45 50 Increase
    > > 60 75 Increase
    > > 65 50 Decrease
    > > 44 44 Same
    > >
    > > Is there a function I can use in Col C to determine if a cell value
    > > increased, decreased or stayed the same? Thanks in advance.
    > >
    > > Michael
    > >
    > >
    > >
    > >
    > >
    > >
    > >

    >
    >




  6. #6
    JulieD
    Guest

    Re: Comparison Function

    Hi Michael

    you're welcome and thanks for the feedback.

    Cheers
    JulieD

    "Michael" <[email protected]> wrote in message
    news:yOuId.20294$B95.1409@lakeread02...
    > Julie - Thanks. I understand your example the best. Thanks to all!!
    >
    > Michael
    >
    >
    >
    > "JulieD" <[email protected]> wrote in message
    > news:%[email protected]...
    >> Hi Michael
    >>
    >> one way
    >>

    > =IF(OR(ISBLANK(B1),ISBLANK(A1)),"",IF(B1=A1,"Same",IF(B1-A1>0,"Increase","De
    > crease")))
    >>
    >> this only puts the words in if both A1 & B1 have data in them
    >>
    >> Cheers
    >> julieD
    >>
    >>
    >>
    >> "Michael" <[email protected]> wrote in message
    >> news:wutId.20293$B95.14346@lakeread02...
    >> > Hi Folks - I have the follwoing data:
    >> >
    >> > Col A Col B Col C
    >> > 45 50 Increase
    >> > 60 75 Increase
    >> > 65 50 Decrease
    >> > 44 44 Same
    >> >
    >> > Is there a function I can use in Col C to determine if a cell value
    >> > increased, decreased or stayed the same? Thanks in advance.
    >> >
    >> > Michael
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >
    >> >

    >>
    >>

    >
    >




  7. #7
    Harlan Grove
    Guest

    Re: Comparison Function

    "Jason Morin" <[email protected]> wrote...
    >In addition to Julie's formula, you could use:
    >
    >=CHOOSE((B1>A1)+1+(A1=B1)*2,"Decrease","Increase","Same")
    >
    >However, mine does not take into consideration blanks - I
    >suppose you could add an IF in there.

    ....

    Or

    =IF(COUNT(A1:B1)=2,CHOOSE(2+SIGN(B1-A1),"Decrease","Same","Increase"),
    "Missing")

    Or if this is purely for display,

    =IF(COUNT(A1:B1)=2,B1-A1,"Missing")

    and give the col C the number format "Increase";"Decrease";"Same".



+ 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