Solved

Sorting Excel with Partial Key

Posted on 2013-01-24
7
284 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
Comment Utility
I would imagine that sorting normally would do just what you want.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
Comment Utility
Unless I am missing something
0
 

Author Comment

by:66chawger
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:66chawger
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel 2013 Problem 12 44
Excel Formula - If And on Blank Cell 7 24
Pivot help 3 21
SQL INSERT error - Excel VBA/ADO/Access 2016 2 23
INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

743 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

13 Experts available now in Live!

Get 1:1 Help Now