+ Reply to Thread
Results 1 to 10 of 10

Comparing 3 Cells

  1. #1
    Registered User
    Join Date
    02-28-2011
    Location
    Juneau, Alaska
    MS-Off Ver
    Excel 2003
    Posts
    5

    Comparing 3 Cells

    I need a formula to compare three cells in three columns, if 2 of the cells have the same value then I would like a cell in the fourth column to register a value of 1.
    Such as; cell A1 = 7, A2 = 5, A3 =7 then A4 would register a 1. If none of values agree then cell A4 would register a 0.
    Thanks you for any help you can offer.
    Last edited by Cutthroat; 03-01-2011 at 04:21 PM. Reason: Solved

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Comparing 3 Cells

    Hi Cutthroat and welcome to the forum
    In A4 put
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    02-28-2011
    Location
    Juneau, Alaska
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Comparing 3 Cells

    Thank you MarvinP, these formula's are elusive and mystical to the uninitiated. As with most things you discover more obstacles as progress. I now need the above formula, which is working well, to return a value of zero if one of the cells has no entry. Could you please explain to me how I would modify the formula to conform to that condition. Thank you for you time and sharing your valuable knowledge.

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Comparing 3 Cells

    Hi Cutthroat, if you thought the last formula was bad look at this one.
    Please Login or Register  to view this content.
    The above says just what you ordered. If any of the three cells are blank then give back a zero. If none of them are blank then do the formula given before.

    My concern is with the ISBLANK function. I'm reading it may be new to Excel 2010 so I'm still working on a 2003 solution. Perhaps an upgrade is in order? I'll keep working... I have to find a list of 2003 functions.

    I know that 2003 had the Len() function so try this
    Please Login or Register  to view this content.
    Last edited by MarvinP; 03-01-2011 at 11:15 AM.

  5. #5
    Registered User
    Join Date
    02-28-2011
    Location
    Juneau, Alaska
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Comparing 3 Cells

    Thank you MarvinP the modified formula is working perfectly. I took full credit for the formula and my supervisor now thinks I'm a genius. I can only hope you will be available for my future career advancement.
    I consider this post "solved", I don't know how to add that icon. Thank you again.
    Last edited by Cutthroat; 03-01-2011 at 01:22 PM. Reason: adding to post

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Comparing 3 Cells

    Edit your original post - press the green button below it. Then click on Go Advanced and edit the prefix.

  7. #7
    Registered User
    Join Date
    10-16-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Comparing 3 Cells

    2 years later your answer still helped!

    Quote Originally Posted by MarvinP View Post
    Hi Cutthroat and welcome to the forum
    In A4 put
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-11-2015
    Location
    london canada
    MS-Off Ver
    excell 2013
    Posts
    3

    Re: Comparing 3 Cells

    trying to compare three cells.. A1, B1, C1. And placing the largest value in D1
    thanks for any help!

  9. #9
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Comparing 3 Cells

    @TW1965 You need to start a new post if you want to ask a new question.
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  10. #10
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Comparing 3 Cells

    Quote Originally Posted by TW1965 View Post
    trying to compare three cells.. A1, B1, C1. And placing the largest value in D1
    thanks for any help!
    . Hi TW1965,
    . You should do what nigelbloomy says.
    . But I was just doing a bit of late night lurking and just learnt coincidentally how to do this, so thought it would be OK to drop the solution in here

    . So I take some arbitrary values in calls A1, B1, C1, and put the formula I just learnt in E1, and used that in a simple INDEX(__,___,__) formula in D1 to get what you want:-

    . Here is the result

    Table a): ( What you see finally in the Spreadsheet )

    Using Excel 2007
    -
    A
    B
    C
    D
    E
    1
    7
    5
    3
    7
    1
    Sheet1

    Using Excel 2007
    Row\Col
    A
    B
    C
    D
    E
    1
    7
    5
    3
    7
    1
    Sheet1

    ………………………………………………………………..
    . Here is the formulas

    Table b):

    Using Excel 2007
    Row\Col
    D
    E
    1
    =INDEX(A1:C1,1,SUM(--(A1:C1=MAX(A1:C1))*COLUMN(A:C)))
    =SUM(--(A1:C1=MAX(A1:C1))*COLUMN(A:C))
    Sheet1

    . Credit goes to Speshul here
    http://www.excelforum.com/tips-and-t...ulas-work.html
    . For sharing a very nice simple explanation of the Array formula in E1

    Alan

    P.s.
    . Don’t forget this is a “CSE” Curly bracket formula thing…

    . To get it to work…
    .1 ) copy ( Ctrl C ) the formula you want complete from the second above Table (Formula Table b) to clipboard
    . 2) select ( click in ) the cell where the formula should go (D1)
    . 3) Hit F2 or select ( click in ) the formula bar (To be on the safe side do both!! )
    . 4) paste in the formula from the clipboard ( Ctrl V ) ( check that the formula includes a = at the start)
    . 5) now you do the famous “CSE” . – That is hold down the keys Ctrl and Shift, and hit Enter.
    Last edited by Doc.AElstein; 06-14-2015 at 06:33 AM. Reason: Highlight in red the CSE bit and take out the testies!!!
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

+ 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