Closed Thread
Results 1 to 4 of 4

Lookup question

  1. #1
    Registered User
    Join Date
    07-03-2007
    Posts
    17

    Lookup question

    I have data like this:

    Q - D - E - R - T - MIN
    4 - 1 - 2 - 3 - 7 - 1
    3 - _ - 5 - _ - _ - 3
    3 - 2 - 2 - 4 - _ - 2

    Headings in row 1, data in rows 2 on down. The underscores are blank cells.
    In column F, I have a formula calculating the MIN of A:E. instead of returning the MIN value, is there a way I can get it to return the column heading?

    There are cases where there will be two MIN values in the same row. I bold the correct one manually for each row, so maybe there's a way to check a cell's formatting and return the column heading?
    Last edited by yuryyuryyury; 07-03-2007 at 04:47 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Try this formula in F2 copied down

    =INDEX(A$1:E$1,MATCH(MIN(A2:E2),A2:E2,0))

    Where there are two equal MIN values in a row this will return the header associated with the leftmost

  3. #3
    Registered User
    Join Date
    07-03-2007
    Posts
    17
    thanks! that does work!

    Is there a way to return the heading if a cell in the range is bold rather than the MIN of the range?

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    yuryyuryyury,

    Thread closed for cross posting. Please read forum rules below. If you agree to them then PM me

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

Closed 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