View Single Post
  #9   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 sure why you're getting errors.....

I used your posted data table, beginning in A1
Maybe you have column headings in Row_1?

If that's the case and the data range is in A2:H8
then these are the formulas

A11:
=LARGE(INDEX((FREQUENCY(($A$2:$H$8+COLUMN($A$2:$H$ 8)*1000),($A$2:$H$8+COLUMN($A$2:$H$8)*1000))1)*RO W($A$1:INDEX($A:$A,COUNT($A$2:$H$8)+1)),0),COLUMNS ($A$11:A11))

A12: =INDEX($A$2:$H$8,CEILING(A11/8,1),MOD(A11-1,8)+1)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Sam via OfficeKB.com" wrote:

Hi Ron,

Thank you for your time and assistance. Unfortunately, I am not getting the
expected results. I receive #N/A in the cells using this Formula:

=LARGE(INDEX((FREQUENCY(($A$1:$H$7+COLUMN($A$1:$H $7)*1000),($A$1:$H$7+COLUMN($A$1:$H$7)*1000))1)*R OW($A$1:INDEX($A:$A,COUNT($A$1:$H$7)+1)),0),COLUMN S($A$10:A10))


This formula locates the duplicate items in the grid A10:


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


My Data starts in Column "D", Row "2". Row "1" has Text Labels. I think I've
made the necessary adjustments for that but I'm still getting #N/A.

Further help appreciated.

Cheers,
Sam

Ron Coderre wrote:
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)*R OW($A$1:INDEX($A:$A,COUNT($A$1:$H$7)+1)),0),COLUMN S($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


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