+ Reply to Thread
Results 1 to 11 of 11

Finding the column with the smallest value..

Hybrid View

  1. #1
    Registered User
    Join Date
    07-09-2012
    Location
    Birmingham, UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Finding the column with the smallest value..

    Morning, hope someone can help.

    I'm currently using the SMALL formula to find the 3 smallest values between D4:J4, which works perfectly... but now I need the results to display either the column number/letter or the column heading, instead of the actual smallest values.

    Hope I've explained this clearly, thanks in advance,
    Greg.

  2. #2
    Registered User
    Join Date
    07-09-2012
    Location
    Birmingham, UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Finding the column with the smallest value..

    Sorry I forgot to mention - I need the three lowest columns, similar to what I can do with the SMALL formula.. i.e =SMALL(D4:J4,2) - but need this to show which column number/letter this is in, rather then the values..

  3. #3
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Finding the column with the smallest value..

    For the smallest value, try

    =INDEX($D$1:$J$1,MATCH(SMALL($D$4:$J$4,1),$D$4:$J$4,0))

    edit to suit for the second and third samllest values.

  4. #4
    Registered User
    Join Date
    07-09-2012
    Location
    Birmingham, UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Finding the column with the smallest value..

    This still shows the actual smallest value - I want it to show the result as the column letter or number (i.e F or 6..) or even better Leeds (as the column is headed)...

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Finding the column with the smallest value..

    Quote Originally Posted by gbzilla View Post
    or even better Leeds (as the column is headed)...
    That is what the formula should be doing, I assumed headers are in D1:J1.

  6. #6
    Registered User
    Join Date
    07-09-2012
    Location
    Birmingham, UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Finding the column with the smallest value..

    Jason - perfect, apologies first time round when I replied I hadn't copied your formula and just pasted my original formula back in!

    That works perfect, exactly what I was after - thanks!

  7. #7
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Finding the column with the smallest value..

    Quote Originally Posted by gbzilla View Post
    I hadn't copied your formula and just pasted my original formula back in!
    Lol an easy mistake to make, at least you managed to find where you went wrong easily.

    Glad it works , thanks for the feedback.

  8. #8
    Registered User
    Join Date
    07-09-2012
    Location
    Birmingham, UK
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Finding the column with the smallest value..

    I'm using this formula at the mo:

    =CELL("col",OFFSET(D4:J4,0,MATCH(MIN(D4:J4),D4:J4,0)-1))

    But I can't adjust that to show the second and third lowest columns....

  9. #9
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Finding the column with the smallest value..

    Without looking at a spreadsheet, I am guessing ..modify Jason's forumla to

    =INDEX($D$1:$J$1,1,MATCH(SMALL($D$4:$J$4,1),$D$4:$J$4,0))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  10. #10
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Finding the column with the smallest value..

    Quote Originally Posted by Ace_XL View Post
    =INDEX($D$1:$J$1,1,MATCH(SMALL($D$4:$J$4,1),$D$4:$J$4,0))
    That wouldn't affect the result, you only need to define row and column with a 2D array, with a 1D array the behaviour of index would be the same as transposing the data.

  11. #11
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: Finding the column with the smallest value..

    slightly...

    =CELL("col",OFFSET(D4:J4,0,MATCH(SMALL(D4:J4,2),D4:J4,0)-1)) --change min with small

    all part stay same....
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

+ 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