+ Reply to Thread
Results 1 to 3 of 3

How to Return Most Common Value in a Table

Hybrid View

  1. #1
    Registered User
    Join Date
    01-31-2016
    Location
    Kansas
    MS-Off Ver
    Office 2013
    Posts
    1

    How to Return Most Common Value in a Table

    In Column A is a list of car makers from Nissan, Ford, Toyota, etc.

    In column B is a list of who sold that make so for example Nissan and Fred could appear in multiple rows.

    How do I perform a formula that searches column A for Nissan and then returns me what name from Column B appears most along with Nissan.

    example
    ColumnA ColumnB
    Nissan Fred
    Nissan Fred
    Nissan Fred
    Nissan Mark
    Nissan Mark
    Ford Mark
    Ford Mark
    Ford Mark
    Ford Mark
    Ford George
    Toyota George
    Toyota George
    Toyota Fred

    I want to search for Nissan and see what name comes up the most matching Nissan from COlumn B

  2. #2
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    3,992

    Re: How to Return Most Common Value in a Table

    Try

    C2=SUMPRODUCT(--(A2&B2=$A$2:$A$14&$B$2:$B$14))

    and searching word in on cell K5

    M5=INDEX(OFFSET($A$1,MATCH(K5,$A$2:$A$14,0),1,COUNTIFS($A$2:$A$14,K5),),MAX(OFFSET($A$1,MATCH(K5,$A$2:$A$14,0),2,COUNTIFS($A$2:$A$14,K5),)))

    Check the attached file.
    Attached Files Attached Files
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: How to Return Most Common Value in a Table

    Try this...

    Data Range
    A
    B
    C
    D
    E
    1
    Nissan
    Fred
    ------
    Nissan
    Fred
    2
    Nissan
    Fred
    3
    Nissan
    Fred
    4
    Nissan
    Mark
    5
    Nissan
    Mark
    6
    Ford
    Mark
    7
    Ford
    Mark
    8
    Ford
    Mark
    9
    Ford
    Mark
    10
    Ford
    George
    11
    Toyota
    George
    12
    Toyota
    George
    13
    Toyota
    Fred


    This array formula** entered in E1:

    =INDEX(B1:B13,MODE(IF(A1:A13=D1,MATCH(B1:B13,B1:B13,0))))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. excel formulas to return the most common value depending on a criteria
    By Carmen Stan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-28-2021, 11:38 AM
  2. Return most common, 2nd common...within the data range
    By tantcu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2015, 06:06 PM
  3. [SOLVED] Return most common text string for a certain outcode
    By alexgimson in forum Excel General
    Replies: 4
    Last Post: 06-29-2015, 11:41 AM
  4. Return common values in multiple worksheets into one worksheet
    By haskenazi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2014, 10:10 PM
  5. Replies: 1
    Last Post: 04-22-2013, 03:24 PM
  6. [SOLVED] Need a formula that will return the 6 most common numbers in a range
    By caldinafan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-29-2013, 09:20 PM
  7. Extracting data from a table based on a common entries with another table
    By shannoncox in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2012, 04:45 PM

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