Technology Get the latest on technology, electronics and software…

Excel Help, Match Sort Tables

Old Oct 18, 2011 | 02:11 PM
  #1  
mastertl's Avatar
Thread Starter
I don't have a Ferrari in
 
Joined: May 2004
Posts: 3,437
Likes: 2
From: Southern California
Excel Help, Match Sort Tables

Hi guys, need some help with Excel here.

I have two tables, each with 10 columns. One has 100 rows and another has 90 rows. They are identical except for those 10 rows but the longer one is sorted alphabetically by Column A and the shorter one is sorted in a random order.

Is there a way for me to match the Alphabetically Sorted table to the Randomly Sorted so that it is in the same order with the additional people on the bottom?

This has been troubling me for some time. Thanks for any help!

J
Reply
Old Oct 18, 2011 | 02:17 PM
  #2  
svtmike's Avatar
Team Owner
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Oct 2003
Posts: 37,702
Likes: 3,899
From: Chicago
I would use a VLOOKUP to determine which entries in the sorted table are not in the random table, and then copy and paste only the rows that are not to the end of the random table.

Is there a reason the randomly ordered table must remain so? You might need to sort it for the VLOOKUP to work correctly.
Reply
Old Oct 18, 2011 | 02:23 PM
  #3  
mastertl's Avatar
Thread Starter
I don't have a Ferrari in
 
Joined: May 2004
Posts: 3,437
Likes: 2
From: Southern California
VLookup works fine to identify the additional rows. But my client is adamant in keeping the random order. There is no rationale whatsoever
Reply
Old Oct 18, 2011 | 02:25 PM
  #4  
svtmike's Avatar
Team Owner
20 Year Member
Liked
Loved
Community Favorite
 
Joined: Oct 2003
Posts: 37,702
Likes: 3,899
From: Chicago
Originally Posted by mastertl
VLookup works fine to identify the additional rows. But my client is adamant in keeping the random order. There is no rationale whatsoever
If you can identify the additional rows, what's the problem? Just append and be done.
Reply
Old Oct 18, 2011 | 02:35 PM
  #5  
rza49311's Avatar
Drifting
iTrader: (1)
 
Joined: Feb 2006
Posts: 3,072
Likes: 8
From: Southern VA
Do you have to do this often or every now and then? Do you have excel 2007 or 2010?

You could try the custom sort option and select custom list and the list would be the randomly sorted list which could just copy/paste column A into the custom list. I just tried it with about 10 lines and it worked perfectly.
Reply
Old Oct 18, 2011 | 03:02 PM
  #6  
rza49311's Avatar
Drifting
iTrader: (1)
 
Joined: Feb 2006
Posts: 3,072
Likes: 8
From: Southern VA
Originally Posted by rza49311
Do you have to do this often or every now and then? Do you have excel 2007 or 2010?

You could try the custom sort option and select custom list and the list would be the randomly sorted list which could just copy/paste column A into the custom list. I just tried it with about 10 lines and it worked perfectly.
I said Column A assuming it was distinct to each line(ie. a primary key) so whichever column is distinct to each line would be the custom sort list to sort the 100 row sheet.
Reply
Old Oct 18, 2011 | 04:45 PM
  #7  
GIBSON6594's Avatar
My Garage
 
Joined: Nov 2004
Posts: 13,386
Likes: 11
From: NY
I'm not sure if this helps, but the line of thinking would be to apply a static ordering to the random table and sort the other table by that static numbering.
Reply
Old Oct 18, 2011 | 05:41 PM
  #8  
uu's Avatar
uu
Burning Brakes
 
Joined: Jan 2001
Posts: 947
Likes: 0
From: New York
Well, I guess you are trying to match all 10 columns? To simplicity's sake, say we have two columns. You will need to use array function.

Say in the "shorter" data, you have:

A W
B X
C Y
D Z

Say that is cell from A1 to B4.

The long data is:

A W
C O
Z P
B X
D Z
E Q
B R
C Y

Say that is cell E1 to F8, then you can get the position of a matching from shorter one in the longer one by:

{=MATCH(1, IF(A1=$E$1:$E$8,1,0)*IF(B1=$F$1:$F$8,1,0), 0)}

The curly bracket means it is a array function, just enter the formula as it is, and press control+enter, then it becomes an array function.

Above formula match the first record in your shorter data, and it return 1, since they match with 1st record in the longer data.

Hope that helps.

Last edited by uu; Oct 18, 2011 at 05:50 PM.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
08_UA7_Gr33k
Member Cars for Sale
13
Feb 11, 2016 02:17 PM
InFaMouSLink
Non-Automotive & Motorcycle Sales
2
Nov 11, 2015 12:19 PM
LogicWavelength
3G TL Photograph Gallery
33
Nov 1, 2015 09:38 AM
InFaMouSLink
Car Parts for Sale
6
Oct 27, 2015 06:52 PM
xsilverhawkx
2G TL Problems & Fixes
4
Oct 5, 2015 11:00 AM



All times are GMT -5. The time now is 02:27 PM.