LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
KR KR is offline
external usenet poster
 
Posts: 121
Default need list of unique values from array in memory

I'm working on a project, where I have several thousand records in an excel
sheet (each has 30+ columns of data). I'm doing various data manipulations,
and all is going well so far.

However, my co-worker/customer has asked for a new report, with the data
segmented by the person who is responsible for each record. So, I have maybe
less than 100 people that repeat throughout my thousands of records. To
dynamically keep my code working, I need to pull a list of all responsible
people from the data itself. So, I'm looking for a way to identify each
"new" name as I cycle through the list.

My approach is to go through each record and compare the name to a shorter
list of the names I've already found, e.g.

for i= 1 to 5000
tempName = MyArray(i,14) 'get the name for that record
for p= 1 to 100 'my list of unique names
if tempName = FoundNames(p) then
exit for 'if I find the name, just
else
FoundName = False
end if
next
If FoundName = False then
FoundNamesCount = FoundNamesCount + 1
FoundNames(FoundNamesCount) = tempName
End if
next

But I'm thinking there must be a better (and faster) way....
Suggestions?

Thanks,
Keith
--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.


 
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
Unique values in an array. Jerry Excel Discussion (Misc queries) 2 October 15th 09 06:44 PM
Returning an array of unique values? Blue Max Excel Worksheet Functions 10 January 16th 08 02:51 AM
Array Formulas - Unique List from List with Duplicates Johnny Meredith Excel Discussion (Misc queries) 7 October 27th 06 09:26 PM
create an array with unique items IN MEMORY Werner Rohrmoser Excel Worksheet Functions 1 September 25th 05 02:55 PM
Frequncy of unique values in array Fábio Coatis Excel Programming 3 July 22nd 03 05:53 AM


All times are GMT +1. The time now is 04:53 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"