Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Compare two columns by aligning same-values and spacing out differences

How space out mismatches of two similar columns while keeping like cells
aligned? For example, how do I convert a worksheet containing (in columns A
and B):

A A
B B
C D
D E
F G
....

... to ..

A A
B B
C
D D
E
F
G


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Compare two columns by aligning same-values and spacing out differences

One play which gets you there ...

The play:
1. Gather source data into one col
2. Use advanced filter uniques on the combined source to extract a uniques
list
3. Do a Data Sort on the uniques list to get it into alpha order
4. Use formulas to compare and re-align the source cols in 2 other cols

Illustrated in this sample:
http://www.freefilehosting.net/download/NDkxNjg=
Compare n align 2 cols in sorted alpha order

Steps
1. Copy n paste source data in cols A and B into col C,
one paste below the other (order immaterial).
Enter a col label in C1, eg: All

2. Select col C, click Data Filter Advanced Filter
List range: $C:$C
Check "Copy to another location"
Copy to: $D$1
Check "Unique records only"
Click OK
This extracts a uniques list into col D

3. Select col D,
do a Data Sort* Sort by "All" Ascending OK
*continue with current selection

4. Then just place in
E2: =IF(ISNUMBER(MATCH(D2,A:A,0)),D2,"")
F2: =IF(ISNUMBER(MATCH(D2,B:B,0)),D2,"")
Select E2:F2, copy down to the last row of data in col D
Cols E & F will return the exact results that you seek
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Jon Davis" wrote in message
...
How space out mismatches of two similar columns while keeping like cells
aligned? For example, how do I convert a worksheet containing (in columns
A and B):

A A
B B
C D
D E
F G
...

.. to ..

A A
B B
C
D D
E
F
G



Reply
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
How do I compare two columns contents for differences Denny Excel Worksheet Functions 3 April 3rd 23 04:16 PM
How do I compare 2 text columns & show differences in 3rd? Kelli Freeman Excel Worksheet Functions 2 December 29th 05 12:42 AM
Compare 2 columns to see differences Bugaglugs Excel Worksheet Functions 4 July 13th 05 02:55 AM
Compare values in columns cpetta New Users to Excel 5 April 2nd 05 03:24 PM
Excel Compare values in columns & display missing values in a new cpetta Excel Discussion (Misc queries) 1 April 2nd 05 05:51 AM


All times are GMT +1. The time now is 01:35 PM.

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"