ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   matching a sorting the exact value in the data list (https://www.excelbanter.com/excel-discussion-misc-queries/31016-matching-sorting-exact-value-data-list.html)

Steve M

matching a sorting the exact value in the data list
 
Hi there,

In Excel 2000 I wish to match and sort the following data using some type of
function in Excel.
CRXU1972999 CRXU1972509
CRXU1973932 CRXU1972999
DFSU6001327 CRXU1973932
GESU2271222 FCIU2056631
GESU9254295 GESU2271222
PCIU3025511 PCIU2365754
PCIU3030457 PCIU3023571
PCIU3038329 PCIU3025511
PCIU3039304 PCIU3026020
PCIU3055060 PCIU3030457
PCIU3060600 PCIU3038329
PCIU3061993 PCIU3039304
PCIU3066085 PCIU3060600


....so the above mentioned data should look like this(see below) after the
function has been applied.

CRXU1972999 CRXU1972999 (wish to join but in seperate columns)
CRXU1973932 CRXU1973932
DFSU6001327 DFSU6001327
and so on....

the data that does not match....I'm assuming it will go to the end.

pls help...need assistance

cheers
Steve M


Bruce

Quote:

Originally Posted by Steve M
Hi there,

In Excel 2000 I wish to match and sort the following data using some type of
function in Excel.
CRXU1972999 CRXU1972509
CRXU1973932 CRXU1972999
DFSU6001327 CRXU1973932
GESU2271222 FCIU2056631
GESU9254295 GESU2271222
PCIU3025511 PCIU2365754
PCIU3030457 PCIU3023571
PCIU3038329 PCIU3025511
PCIU3039304 PCIU3026020
PCIU3055060 PCIU3030457
PCIU3060600 PCIU3038329
PCIU3061993 PCIU3039304
PCIU3066085 PCIU3060600


....so the above mentioned data should look like this(see below) after the
function has been applied.

CRXU1972999 CRXU1972999 (wish to join but in seperate columns)
CRXU1973932 CRXU1973932
DFSU6001327 DFSU6001327
and so on....

the data that does not match....I'm assuming it will go to the end.

pls help...need assistance

cheers
Steve M



Try this VBA routine I developed.

'
' One Criteria Match (Two Sheet)
' Macro recorded 28/09/98 by Bruce Ross Strachan
'
'
Sub OneCriteriaMatchMacro()

Start:
Sheets("1").Select
ActiveCell.Select
Let R1 = ActiveCell
Sheets("3").Select
ActiveCell.Select
Let R2 = ActiveCell
TEST1:
If R1 = R2 Then
GoTo CUT1
Else
If R1 R2 Then
GoTo Inc1
Else
GoTo Inc2
Inc1:
Sheets("3").Select
ActiveCell.Offset(1).Range("A1").Select
GoTo IFBLANK
Inc2:
Sheets("1").Select
ActiveCell.Offset(1).Range("A1").Select
GoTo IFBLANK
CUT1:
Sheets("3").Select
ActiveCell.Offset(0, -10).Range("a1:k1").Select
Selection.Cut
ActiveCell.Offset(0, 10).Range("A1").Select
Sheets("1").Select
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveSheet.Paste
ActiveCell.Offset(1, -1).Range("A1").Select
GoTo IFBLANK
IFBLANK:
If R1 = ISBLANK Or R2 = ISBLANK Then
GoTo END1
Else
GoTo Start
End If
End If
END1:
End If
End Sub


All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com