View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default Return Unique Consecutive Duplicate Values across Single Row

Not that this is better than the VBA solution posted.....
but, since you posted in the worksheet functions group,
and I felt like a challenge...
try this:

With your posted list in A1:H7

This formula locates the duplicate items in the grid
A10:
=LARGE(INDEX((FREQUENCY(($A$1:$H$7+COLUMN($A$1:$H$ 7)*1000),($A$1:$H$7+COLUMN($A$1:$H$7)*1000))1)*RO W($A$1:INDEX($A:$A,COUNT($A$1:$H$7)+1)),0),COLUMNS ($A$10:A10))

Copy that formula across to the right, 10 columns or so

This formula translates the location reference to an item in the grid
A11: =INDEX($A$1:$H$7,CEILING(A10/8,1),MOD(A10-1,8)+1)
Copy that formula across to the right also

I hope that helps.
***********
Regards,
Ron

XL2002, WinXP


"Sam via OfficeKB.com" wrote:

Hi All,

I have a Named Range called "Data" that spans 8 columns and 7 rows. A Numeric
Value will appear only once in a row. Each row's Numeric Values are in
ascending order. A unique consecutive duplicate MUST be in the SAME column.

I would like to Return across a single row unique consecutive duplicates
(single instance
of a consecutive duplicate value in the SAME column) in ascending order.

Sample Data Layout:

101 102 107 110 145 370 490 501
104 106 107 144 360 430 470 580
125 129 140 150 350 430 460 590
101 102 129 130 149 330 440 578
101 108 120 129 200 280 430 535
100 111 170 175 176 280 420 520
121 189 170 202 229 230 420 521

Expected Results: Unique Duplicate Returned across Single Row
101 107 170 280 420 430

Column 1 = 101
Column 3 = 107, 170
Column 6 = 280, 430
Column 7 = 420


Thanks,
Sam

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200702/1