Lookup....

sssb2000

Well-known Member
Joined
Aug 17, 2004
Messages
1,169
Hello :)

i have a table (A2:E10). column A contains names. Columns B:E contain either "yes" or ""
B1:E1 contains headers listing the qualities: (ie. honest, good, evil, stupid)


For each quality listed (lets say in columns K1:N1), i would like the associated names from teh above table listed.

here's an example:


A-----B--------C-------D-----E
------Honest---Good---EVil---Stupid
--------------------------------------
Joe---Yes-------------Yes
Jack ----------Yes----Yes
Sam--------------------------Yes
Jill----Yes




Now, in K1:N1, i'd like this:


K-----------L-------M------N
Honest-----Good----Evil----Stupid

Joe---------Jack----Joe----Sam
Jill------------------Jack




thanks for any help in advance :)
 
Last edited:

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Try...

K2, confirmed with CONTROL+SHIFT+ENTER, and copied across and down:

Code:
=IF(ROWS(K$2:K2)<=COUNTIF(INDEX($B$2:$E$5,0,MATCH(K$1,$B$1:$E$1,0)),"Yes"),INDEX($A$2:$A$5,SMALL(IF(INDEX($B$2:$E$5,0,MATCH(K$1,$B$1:$E$1,0))="Yes",ROW($A$2:$A$5)-ROW($A$2)+1),ROWS(K$2:K2))),"")

Hope this helps!
 
Upvote 0
Hi Try:-
Code:
Dim Rng As Range, Dn As Range
Set Rng = Range(Range("A2"), Range("E" & Rows.Count).End(xlUp))
For Each Dn In Rng
    If Dn.Value = "Yes" Then
        Dn.Offset(, 9) = Cells(Dn.Row, "A").Value
    End If
Next Dn
Regards Mick
 
Upvote 0
Try...

K2, confirmed with CONTROL+SHIFT+ENTER, and copied across and down:

Code:
=IF(ROWS(K$2:K2)<=COUNTIF(INDEX($B$2:$E$5,0,MATCH(K$1,$B$1:$E$1,0)),"Yes"),INDEX($A$2:$A$5,SMALL(IF(INDEX($B$2:$E$5,0,MATCH(K$1,$B$1:$E$1,0))="Yes",ROW($A$2:$A$5)-ROW($A$2)+1),ROWS(K$2:K2))),"")

Hope this helps!

That worked like a charm! thank you.

also, thanks MikeG!
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top