View Single Post
  #9   Report Post  
Bruno Campanini
 
Posts: n/a
Default Search multiple values to return single values

"JANA" wrote in message
...
I have a worksheet that has multiple labor categories listed on different
lines. On another worksheet I want to pull each labor category only once
and
put them each on a different line. Please see example below. Is there a
way
to do this in excel and if so how?
Thanks,
Jana

WORKSHEET A
A
1 S1
2 T3
3 T4
4 S1
5 T3
6 S2

I want the formulas in worksheet B so they will deliver the following
data -
don't need them in any certain order, just need each to only list once on
a
different line.
WORKSHEET B
A
1 S1
2 S2
3 T3
4 T4


This gruops your data without ordering
(replace Ra4 with your data range):

{=IF(ROW(A1)SUM(IF(LEN(Ra4)0,1/COUNTIF(Ra4,Ra4))),"",
INDEX(Ra4,SMALL(IF(MATCH(Ra4,Ra4,0)=ROW
(INDIRECT("1:"&ROWS(MATCH(Ra4,Ra4,0)))),
MATCH(Ra4,Ra4,0),""),ROW(A1))))}
FormulaArray = enter with CTRL+SHIFT+ENTER

Ciao
Bruno