|
-
Mar 26th, 2004, 04:20 PM
#1
Thread Starter
Addicted Member
Howto compare a bunch of range areas?
I've have this Excel VBA script working now to where it pulls in a section of hundreds of other spreadsheets.
The range it pulls and adds to a new Workbook is about 15 columns by 10 rows big. (so it will end up with hundreds of these copied ranges on a sheet). The range areas are all the same size and have the same layout.
Each range that I've copied is like a data matrix. But, despite their size, I already know there are only about 15 different possiblities of how they will look.
The data part of them can have about 5 different values that are alpha numeric (i.e. 'B', '1', '0','Y','N').
What I need to do is to scan everyone of those grids (15x10 ranges) and give them a label for sorting.
I've been thinking of ways to do this. I can only think of maybe using arrays to compare every single ranged aread. I know off hand one thing that hurts me is that it's not possible to redim anything but a single dimension array. I figure since I don't know how many grids will get pulled I'll have to redim, meaning I would need a massive amount of single dimension arrays.
Is there some quick way of comparing a large number of ranges on a spreadsheet to find out which ones match each others?
Thanks for any help?
-
Mar 26th, 2004, 08:22 PM
#2
Thread Starter
Addicted Member
Well so far the best I can come up with is to write out the grids in a straight line on an single index sheet (massive amount of columns).
I'm working on it now but my theory is I just need two arrarys - one to load one row and then check it against all the other rows (loading them one at a time into the 2nd array). With an extra temp column for a "marker" I could only check rows that don't have a match already or havent been check.
Then I guess another column with an index number (1,2,3) so that if you sort by "1" it will be all matches....
that's the best I can think of on my own right now.
hmm... I found this VBA script that could be modified to do what I want:
http://www.exceltip.com/st/Compare_t...Excel/476.html
Last edited by Garratt; Mar 26th, 2004 at 08:26 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|