Solved

Sorting Excel with Partial Key

Posted on 2013-01-24
7
295 Views
Last Modified: 2013-02-18
Hello,

I use different formulas and macros to sort/filter an excel s/s.  However, I currently have a situation where I have been unsuccessful..I don't think it is difficult, I just can't figure out wysiwyg or programmatically how to solve.  Below is the situation.

I have a s/s that has been merged with an updated version of the same s/s.  
What I want to do is sort the s/s with the "TC ID" but need to search partially in order to determine duplicates (old rows) that can be removed.

Example:

TC ID
PR72300A.SOMETHING...0001
PR72320.SOMETHINGELSE...0002
"
"
PR72300ax.SOMETHING.0001
"
PR72320xx.SOMETHINGELSE.0002

As u can see the first two "TC ID's" have something in commone with the older ones further down... however, how to sort using partial key lookup so they are in the following order:

PR72300A.SOMETHING...0001
PR72300ax.SOMETHING.0001
"
PR72320.SOMETHINGELSE...0002
PR72320xx.SOMETHINGELSE.0002
"
"

This s/s has about 64k rows.
0
Comment
Question by:66chawger
  • 4
  • 2
7 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38815827
I would imagine that sorting normally would do just what you want.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38815835
Unless I am missing something
0
 

Author Comment

by:66chawger
ID: 38815877
Yes, the problem is there are many rows separating these in the s/s, so with just normal sorting I cannot get them grouped together as I indicated.  The newer row might be 10-20 rows before the old row even after sorting.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:66chawger
ID: 38816112
I tried different kinds of filtering... contains, begins with, custom... even fiddled with some formulas and macros but no success.
0
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 38816435
Please post a sample file.  I agree with ssaqibh: this is something that should work just fine.
0
 

Accepted Solution

by:
66chawger earned 0 total points
ID: 38884537
My apologies for the lack of response..  I ended up writing some VB script to do what I needed.  It seems the Excel sorting mechanism would work, but the situation was a bit more elaborate.
0
 

Author Closing Comment

by:66chawger
ID: 38900867
The question has been open for a lengthy period of time.  The solution ended up being VB code I had to write in order to accomodate the task.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Tags from access to excel 3 28
increment numbers by 10 11 30
Excel VBA - Run Time error '1004' Application-defined or object-defined error 4 26
excel help 4 18
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now