Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default display Column Header based on cell value in a range

So I have been looking and have failed. I am trying to divise a function that will find the smallest values in a range (distantce in miles) for a given employee and output the store number (column header) which is closest to that employee and inversely the employee that has the smallest distance to a given store. I need to do this for the 3 smallest values. I have attached a sample of the sheet in which i am working with. Thanks for looking
Attached Files
File Type: zip Test Book excel Banter.zip (7.4 KB, 91 views)
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 51
Default display Column Header based on cell value in a range

Il 26/09/2012 21:05, juanvaldez ha scritto:
So I have been looking and have failed. I am trying to divise a function
that will find the smallest values in a range (distantce in miles) for a
given employee and output the store number (column header) which is
closest to that employee and inversely the employee that has the
smallest distance to a given store. I need to do this for the 3 smallest
values. I have attached a sample of the sheet in which i am working
with. Thanks for looking


+-------------------------------------------------------------------+
|Filename: Test Book excel Banter.zip |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=603|
+-------------------------------------------------------------------+




Put in L2
=INDEX($B$1:$J$1,MATCH(SMALL($B2:$J2,COLUMN(A1)),$ B2:$J2,0))
copy to L2:N12

Put in B16
=INDEX($A$2:$A$12,MATCH(SMALL(B$2:B$12,ROW(A1)),B$ 2:B$12,0))
copy to B16:J18

Hi,
E.
  #3   Report Post  
Junior Member
 
Posts: 2
Default

That works perfectly thanks so much






Quote:
Originally Posted by plinius View Post
Il 26/09/2012 21:05, juanvaldez ha scritto:
So I have been looking and have failed. I am trying to divise a function
that will find the smallest values in a range (distantce in miles) for a
given employee and output the store number (column header) which is
closest to that employee and inversely the employee that has the
smallest distance to a given store. I need to do this for the 3 smallest
values. I have attached a sample of the sheet in which i am working
with. Thanks for looking


+-------------------------------------------------------------------+
|Filename: Test Book excel Banter.zip |
|Download: http://www.excelbanter.com/attachment.php?attachmentid=603|
+-------------------------------------------------------------------+




Put in L2
=INDEX($B$1:$J$1,MATCH(SMALL($B2:$J2,COLUMN(A1)),$ B2:$J2,0))
copy to L2:N12

Put in B16
=INDEX($A$2:$A$12,MATCH(SMALL(B$2:B$12,ROW(A1)),B$ 2:B$12,0))
copy to B16:J18

Hi,
E.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Dates in a range based on Column Header Id without using sum-product sam999 Excel Worksheet Functions 1 July 6th 12 12:30 AM
How to display month in a column based on a value in a cell Panchi New Users to Excel 5 December 16th 08 11:45 AM
Search for a column based on the column header and then past data from it to another column in another workbook minkokiss Excel Programming 2 April 5th 07 01:12 AM
Row & Column Header Display Natalie Excel Discussion (Misc queries) 1 March 5th 07 05:46 PM
Excel 2007 Display value based on values in another column range ChrisM Excel Worksheet Functions 2 September 4th 06 03:32 PM


All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"