+ Reply to Thread
Results 1 to 4 of 4

Return a particular value in a range of cells?

  1. #1
    Registered User
    Join Date
    09-07-2004
    Posts
    5

    Unhappy Return a particular value in a range of cells?

    Is there a way for Excel to look at 6 cells in a row and return the value that occurs twice?

    For example in cells A B C D E F you have numbers 10,11,11,12,11,12. I want it to return the number 12, even if the data is inputed in a different order (10,11,12,11,11,12 or 11,10,11,12,12,11 etc.)


    In my situation, the number 12 will never be in cell A or B, so maybe there is a way to search cells C, D, E, F, and then return the number that occurs in cells C, D, E or F, but does not occur in cells A or B?


    Any suggestions would be greatly appreciated!

  2. #2
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    In your example, if we look at C, D, E and F, 11 appears twice and 12 also appears twice. What would you like to have happen in this scenario? What if 11 appeared once and 12 appeared three times?

  3. #3
    Registered User
    Join Date
    03-25-2004
    Posts
    57
    Try in cell H1

    =MAX(IF(COUNTIF($A$1:$G$1,A1:G1)=2,A1:G1,0))

    entered as an array formula: ctrl+shift+enter

    This will enter the largest value that appears exactly twice

    Hope this helps
    free

  4. #4
    Registered User
    Join Date
    09-07-2004
    Posts
    5
    Works nice, thanks!

+ 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