View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
vsoler vsoler is offline
external usenet poster
 
Posts: 79
Default Working with pairs of cells

On 17 jun, 12:35, Max wrote:
Another tinker to try, using non-array formulas ..

Source data assumed in cols A and B, from row1 down

In C1:
=IF(COUNTA(A1:B1)<2,"",IF(SUMPRODUCT(($A$1:A1=A1)* ($B$1:B1=B1))1,"",CODE(L*EFT(A1))+ROW()/10^10))

In D1:
=IF(ROW()COUNT($C:$C),"",INDEX(A:A,MATCH(SMALL($C :$C,ROW()),$C:$C,0)))
Copy D1 to E1. Select C1:E1, copy down to cover the max expected extent of
data in cols A and B, say down to E100? Hide away col C. Cols D and E will
return the required results all neatly bunched at the top, viz. for the
posted sample source data, you'd get:

cup water
light team
table cup
water wine

--
Max
Singaporehttp://savefile.com/projects/236895
xdemechanik
---


Hello Max,

Thank you very much for your solution. It works very well. I am going
to study in detail how it works