+ Reply to Thread
Results 1 to 3 of 3

Finding Top Cell in list

  1. #1
    Registered User
    Join Date
    10-04-2016
    Location
    Cambridge, England
    MS-Off Ver
    Mac 2016
    Posts
    2

    Finding Top Cell in list

    I have two sheets, one has products names in a vertical list, and the other has product names in a table (this isn't a table using the excel table)

    heading A Heading B Heading C
    Product 1 Product 11 Product 31
    Product 12 Product 13 Product 23


    In this table products can only appear once and names are unique. I want to add the heading name to the first list so that each product in the vertical list has a heading name against it. I can't see a way to do this using my current skill set (vlookup, hlookup and and few more). Any suggestions appreciated.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,650

    Re: Finding Top Cell in list

    this shall work in B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    it is array formula* and I assumed your second table table is in columns D:F (headers in row 1)

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Best Regards,

    Kaper

  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: Finding Top Cell in list

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Heading A
    Heading B
    Heading C
    ------
    Product 1
    Heading A
    2
    Product 1
    Product 11
    Product 31
    Product 12
    Heading A
    3
    Product 12
    Product 13
    Product 23
    Product 11
    Heading B
    4
    Product 13
    Heading B
    5
    Product 31
    Heading C
    6
    Product 23
    Heading C


    This array formula** entered in F1 and copied down:

    =INDEX(A$1:C$1,MAX(IF(A$2:C$3=E1,COLUMN(A$2:C$3)))-COLUMN(A$2)+1)

    ** 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. Replies: 3
    Last Post: 06-22-2015, 03:45 AM
  2. finding one word from a list of cell that contain multiple sentences
    By maulik1k in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-28-2014, 06:54 PM
  3. Adding a date to the bottom of a list and finding the correct cell
    By nappy1001 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-05-2014, 04:48 AM
  4. [SOLVED] Finding a value in a list, then outputting the cell to the right
    By Yoshi64 in forum Excel General
    Replies: 6
    Last Post: 01-07-2014, 05:46 AM
  5. [SOLVED] Finding Values in one random list, highlighting, and labeling based on a known list
    By mark00thomas in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-14-2013, 07:41 AM
  6. [SOLVED] Finding empty cell in list
    By Don in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2006, 07:00 PM
  7. [SOLVED] Finding cell value from top of a list greater than 0
    By Joker in forum Excel General
    Replies: 2
    Last Post: 01-11-2006, 11:55 AM

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