Hi!
Sorry about responding so late. I lost track of this thread. Anyhow....
I suppose this would be easier if you know VBA but I don't know VBA at all!
Using worksheet formulas it would not be possible to get all of the possible
data in a single row if there is more than one match. That is:
Dan Ted Tom Bill
...1........2.........1.......2
From that sample you can get:
1.....Dan.....Tom
2.....Ted.....Bill
Here are the formulas that will do what you want.
So, assume your data is in the range A1:D2
In A3 enter this formula with the key combo of CTRL,SHIFT,ENTER:
=IF(ISERROR(SMALL(IF(FREQUENCY(A$2:D$2,A$2:D$2)1, ROW($1:$4)),ROW(1:1))),"",INDEX(A$2:D$2,SMALL(IF(F REQUENCY(A$2:D$2,A$2:D$2)1,ROW($1:$4)),ROW(1:1))) )
Copy *down* enough rows to cover the highest number of possible matches. If
your data really is only 4 columns then the highest possible number of
matches would be 2.
In B3 enter this formula with the key combo of CTRL,SHIFT,ENTER:
=IF(ISERROR(SMALL(IF($A$2:$D$2=$A3,COLUMN($A2:$D2) ),COLUMN(A:A))),"",INDEX($A$1:$D$1,SMALL(IF($A$2:$ D$2=$A4,COLUMN($A2:$D2)),COLUMN(A:A))))
Again, copy *across* to enough columns to cover the highest possible number
of ties. If your data really is only 4 columns then the highest possible
number of ties would be 4. Copy across then down.
Biff
"DunderMifflin"
wrote in message
news:DunderMifflin.1pp9ue_1117213503.0551@excelfor um-nospam.com...
bump..........
--
DunderMifflin
------------------------------------------------------------------------
DunderMifflin's Profile:
http://www.excelforum.com/member.php...o&userid=23780
View this thread: http://www.excelforum.com/showthread...hreadid=374161