Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

HLookup

Posted on 2012-09-17
4
Medium Priority
?
368 Views
Last Modified: 2012-09-17
I have a 6-column table and I'd like to output the column header for each row of the max-value column.    Ok, that may sound confusing... here's an example:


A     B     C     D     E     F           Best
98   97   88   99    76   81        D
92   93   91   92    95   97        F
98   89   88   97    96   98        A, F

Only challenge maybe the 3rd row where A and F have the same max value.  

How can this be accomplished (via HLookup)?

EEH
0
Comment
Question by:ExpExchHelp
  • 2
4 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38405178
Hlookup will only return one. For more than on you probably have to go to VBA
0
 
LVL 23

Accepted Solution

by:
NBVC earned 2000 total points
ID: 38405211
You can try this formula:  

Assuming data is in A:F, then in G2 try:

=SUBSTITUTE(TRIM(IF(A2=MAX(A2:F2),A$1,"")&" "&IF(B2=MAX(A2:F2),B$1,"")&" "&IF(C2=MAX(A2:F2),C$1,"")&" "&IF(D2=MAX(A2:F2),D$1,"")&" "&IF(E2=MAX(A2:F2),E$1,"")&" "&IF(F2=MAX(A2:F2),F$1,""))," ",", ")

copied down.
0
 

Author Comment

by:ExpExchHelp
ID: 38405357
NB_VC:

That's the PERFECT solution!!!!

Thousand thanks,
EEH
0
 

Author Closing Comment

by:ExpExchHelp
ID: 38405359
Perfect Solution!!!!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question