Column has about 710 part numbers and the master has about 12,000 ,I want to align the information into a third columnI don't understand "Align".
[TABLE="width: 1312"]Can you copy and post a small example of what you have, and below it show what it should look like when "aligned"?
Regards,
Howard
Excel 2007 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | 1410-0053 SLEEVE | $0.53 | $2.60 | 0100-1500C | BODY ASSY | $455.00 | $179.73 | 199.69 | 224.66 | 561.64 | ||
2 | 0100-1540P PUMP HOUSING | $24.96 | $79.50 | 0100-1500N | BODY ASSY | $1,044.00 | $412.38 | 458.2 | 515.48 | 1288.69 | ||
3 | 0100-1543P HOUSING 3" 9343P | $25.55 | $97.50 | 0100-1500X | BODY ASSY | $1,446.00 | $571.17 | 634.63 | 713.96 | 1784.91 | ||
4 | 0101-2100PM HEAD VERSA TWIN | $35.63 | $95.00 | 0100-1540P | PUMP HOUSING | $58.00 | $22.91 | 25.46 | 28.64 | 71.59 | ||
5 | 0102-2300A CRANKCASE 2300 | $0.00 | $228.00 | 0100-1543P | PUMP HOUSING | $171.00 | $67.55 | 75.05 | 84.43 | 211.08 | ||
6 | 0113434308 CLIP COBRA 1" BLK | $1.97 | $8.00 | 0100-1700C | BODY ASSY | $246.00 | $97.17 | 107.97 | 121.46 | 303 | ||
7 | ||||||||||||
8 | ||||||||||||
9 | ||||||||||||
10 | ||||||||||||
11 | ||||||||||||
Sheet1 |
Excel 2007 | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | |||
1 | 0100-1500C | BODY ASSY | $455.00 | $179.73 | 199.69 | 224.66 | 561.64 | |||||
2 | 0100-1500N | BODY ASSY | $1,044.00 | $412.38 | 458.2 | 515.48 | 1288.69 | |||||
3 | 0100-1500X | BODY ASSY | $1,446.00 | $571.17 | 634.63 | 713.96 | 1784.91 | |||||
4 | 0100-1540P PUMP HOUSING | $24.96 | $79.50 | 0100-1540P | PUMP HOUSING | $58.00 | $22.91 | 25.46 | 28.64 | 71.59 | ||
5 | 0100-1543P HOUSING 3" 9343P | $25.55 | $97.50 | 0100-1543P | PUMP HOUSING | $171.00 | $67.55 | 75.05 | 84.43 | 211.08 | ||
6 | 0100-1700C | BODY ASSY | $246.00 | $97.17 | 107.97 | 121.46 | 303 | |||||
7 | 0101-2100PM HEAD VERSA TWIN | $35.63 | $95.00 | |||||||||
8 | 0102-2300A CRANKCASE 2300 | $0.00 | $228.00 | |||||||||
9 | 0113434308 CLIP COBRA 1" BLK | $1.97 | $8.00 | |||||||||
10 | 1410-0053 SLEEVE | $0.53 | $2.60 | |||||||||
11 | ||||||||||||
Sheet1 |
Sub AlignColumns()
' hiker95, 09/03/2014, ME802866
Dim r As Long, lr As Long, d As Range, s
Application.ScreenUpdating = False
Columns(1).Insert
lr = Cells(Rows.Count, 2).End(xlUp).Row
Range("A1:A" & lr).NumberFormat = "@"
For Each d In Range("B1:B" & lr)
s = Split(d, " ")
d.Offset(, -1) = s(0)
Next d
Range("A1:D" & lr).Sort key1:=Range("A1"), order1:=1
Range("E1:K" & lr).Sort key1:=Range("E1"), order1:=1
Set d = Range("A1:A" & lr)
r = 1
Do While d.Cells(r, 1) <> ""
If d.Cells(r, 1).Offset(, 4) <> "" Then
If d.Cells(r, 1) < d.Cells(r, 1).Offset(, 4) Then
d.Cells(r, 1).Offset(, 5).Resize(, 7).Insert -4121
ElseIf d.Cells(r, 1) > d.Cells(r, 1).Offset(, 4) Then
d.Cells(r, 1).Resize(, 4).Insert -4121
lr = lr + 1
Set d = Range("A1:A" & lr)
End If
End If
r = r + 1
Loop
Columns(1).Delete
Application.ScreenUpdating = True
End Sub