Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Identifying Duplicates

Hi All
In a VBA procedure I have 5 integer numbers held in 5 different variables,
n1 to n5. I want to identify if any combination of these values are
duplicated and to highlight which ones.

So if the values are
1,2,3,4,5 - No duplicates All Ok
1,1,3,4,5 - Two duplicates - positions1 and 2
1,1,3,1,5 - Three duplicates - positions 1, 2 and 4
1,1,3,4,4 - Four duplicates - postions 1,2,4 and 5
1,1,1,1,1 - Five Duplicates - positions 1,2,3,4 and 5

I guess I need to loop through each variable testing each other variable for
match or not and log any errors and positions.

Any ideas on the best approach

Cheers
TIA
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Identifying Duplicates

Check out this page.
http://www.cpearson.com/excel/duplic...tingDuplicates
HTH

"Nigel" wrote in message
...
Hi All
In a VBA procedure I have 5 integer numbers held in 5 different variables,
n1 to n5. I want to identify if any combination of these values are
duplicated and to highlight which ones.

So if the values are
1,2,3,4,5 - No duplicates All Ok
1,1,3,4,5 - Two duplicates - positions1 and 2
1,1,3,1,5 - Three duplicates - positions 1, 2 and 4
1,1,3,4,4 - Four duplicates - postions 1,2,4 and 5
1,1,1,1,1 - Five Duplicates - positions 1,2,3,4 and 5

I guess I need to loop through each variable testing each other variable

for
match or not and log any errors and positions.

Any ideas on the best approach

Cheers
TIA
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000

Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identifying unique values among duplicates bob Excel Worksheet Functions 4 November 10th 08 09:43 PM
Identifying Outliers Quco Excel Discussion (Misc queries) 13 February 14th 07 06:32 PM
Identifying Duplicates in Columns DamienO Excel Worksheet Functions 2 March 30th 06 04:53 PM
Identifying famdamly Excel Discussion (Misc queries) 2 February 26th 06 06:44 AM
Identifying links Andrew Excel Discussion (Misc queries) 2 June 30th 05 01:17 PM


All times are GMT +1. The time now is 08:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"