jennifer865
New Member
- Joined
- Jan 9, 2015
- Messages
- 10
Hello! I am new to VBA and new to this forum! First off:
1. I am using Excel 2010.
2. I have a PC.
Ok, I have 3 sets of data and I need to sort, compare, and align.
Start
<colgroup><col style="font-weight:bold; width:30px; "><col style="width:52px;"><col style="width:197px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: center"]0011[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]17[/TD]
[TD="align: center"]0016[/TD]
[TD="align: right"] * *1,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]18[/TD]
[TD="align: center"]0020[/TD]
[TD="align: right"] * * * * * *3,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]19[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]20[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
In the above, Set 1 is shown in Columns A-C, Set 2 is in E-G, and Set 3 is in I-K. What I need the macro to do is sort Set 1 by Column A (Asset #) in ascending order. Then, go to Set 2, sort by Column E (Asset #) and match line by line with Set 1, leaving blank lines if an Asset # is not found. Finally, go to Set 3, sort by Column I and match line by line, again leaving blank lines if an Asset # is not found. The final product will look like this:
End
<colgroup><col style="font-weight:bold; width:30px; "><col style="width:52px;"><col style="width:179px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]0011[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]17[/TD]
[TD="align: center"]0016[/TD]
[TD="align: right"] * *1,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]18[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]19[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]20[/TD]
[TD="align: center"]0019[/TD]
[TD="align: right"] * * * * * *5,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]21[/TD]
[TD="align: center"]0020[/TD]
[TD="align: right"] * * * * * *3,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
Your help is much appreciated!
1. I am using Excel 2010.
2. I have a PC.
Ok, I have 3 sets of data and I need to sort, compare, and align.
Start
* | A | B | C | D | E | F | G | H | I | J | K |
WAREHOUSE | WAREHOUSE | YARD TRACTOR | |||||||||
SCISSOR LIFT | OFFICE BLDG | FORKLIFT | |||||||||
14 ACRE CORP CAMPUS | GARAGE | CHEVY VAN | |||||||||
GMC PICKUP TRUCK | 14 ACRE CORP CAMPUS | COPIER | |||||||||
YARD TRACTOR | GMC PICKUP TRUCK | SCISSOR LIFT | |||||||||
FORKLIFT | YARD TRACTOR | WAREHOUSE | |||||||||
OFFICE BLDG | FORKLIFT | OFFICE BLDG | |||||||||
GARAGE | CHEVY VAN | GARAGE | |||||||||
CHEVY VAN | CONFERENCE DESK | 14 ACRE CORP CAMPUS | |||||||||
CONFERENCE DESK | PHONE SYSTEM | GMC PICKUP TRUCK | |||||||||
PHONE SYSTEM | COPIER | CONFERENCE DESK | |||||||||
REFRIGERATOR | MERCHANDISE PICKER | MERCHANDISE PICKER | |||||||||
COPIER | SCISSOR LIFT | DELL 300 | |||||||||
MERCHANDISE PICKER | LABEL READER | * | * | * | |||||||
LABEL READER | DELL 300 | * | * | * | |||||||
CONVEYOR | INTEL SPIRON | * | * | * | |||||||
PACKER SOFTWARE UPGARDE | * | * | * | * | * | * | |||||
INTEL SPIRON | * | * | * | * | * | * | |||||
DELL 300 | * | * | * | * | * | * |
<colgroup><col style="font-weight:bold; width:30px; "><col style="width:52px;"><col style="width:197px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: center"]0011[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]17[/TD]
[TD="align: center"]0016[/TD]
[TD="align: right"] * *1,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]18[/TD]
[TD="align: center"]0020[/TD]
[TD="align: right"] * * * * * *3,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]19[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]20[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
In the above, Set 1 is shown in Columns A-C, Set 2 is in E-G, and Set 3 is in I-K. What I need the macro to do is sort Set 1 by Column A (Asset #) in ascending order. Then, go to Set 2, sort by Column E (Asset #) and match line by line with Set 1, leaving blank lines if an Asset # is not found. Finally, go to Set 3, sort by Column I and match line by line, again leaving blank lines if an Asset # is not found. The final product will look like this:
End
* | A | B | C | D | E | F | G | H | I | J | K |
WAREHOUSE | WAREHOUSE | WAREHOUSE | |||||||||
OFFICE BLDG | OFFICE BLDG | OFFICE BLDG | |||||||||
GARAGE | GARAGE | GARAGE | |||||||||
14 ACRE CORP CAMPUS | 14 ACRE CORP CAMPUS | 14 ACRE CORP CAMPUS | |||||||||
GMC PICKUP TRUCK | GMC PICKUP TRUCK | GMC PICKUP TRUCK | |||||||||
YARD TRACTOR | YARD TRACTOR | YARD TRACTOR | |||||||||
FORKLIFT | FORKLIFT | FORKLIFT | |||||||||
CHEVY VAN | CHEVY VAN | CHEVY VAN | |||||||||
CONFERENCE DESK | CONFERENCE DESK | CONFERENCE DESK | |||||||||
PHONE SYSTEM | PHONE SYSTEM | * | * | * | |||||||
REFRIGERATOR | * | * | * | * | * | * | |||||
COPIER | COPIER | COPIER | |||||||||
MERCHANDISE PICKER | MERCHANDISE PICKER | MERCHANDISE PICKER | |||||||||
SCISSOR LIFT | SCISSOR LIFT | SCISSOR LIFT | |||||||||
LABEL READER | LABEL READER | * | * | * | |||||||
CONVEYOR | * | * | * | * | * | * | |||||
DELL 300 | DELL 300 | DELL 300 | |||||||||
INTEL SPIRON | INTEL SPIRON | * | * | * | |||||||
PACKER II SOFTWARE | * | * | * | * | * | * | |||||
PACKER SOFTWARE UPGARDE | * | * | * | * | * | * |
<colgroup><col style="font-weight:bold; width:30px; "><col style="width:52px;"><col style="width:179px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"><col style="width:17px;"><col style="width:52px;"><col style="width:140px;"><col style="width:77px;"></colgroup><tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]ASSET #[/TD]
[TD="align: center"]ASSET DESCRIPTION[/TD]
[TD="align: center"] COST [/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0001[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0002[/TD]
[TD="align: right"] * *2,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0003[/TD]
[TD="align: right"] * *3,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0004[/TD]
[TD="align: right"] * *5,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0005[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0006[/TD]
[TD="align: right"] * * * * *40,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0007[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0008[/TD]
[TD="align: right"] * * * * *20,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0009[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0010[/TD]
[TD="align: right"] * * * * * *2,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]0011[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0012[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0013[/TD]
[TD="align: right"] *10,000,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0014[/TD]
[TD="align: right"] * * * * *10,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0015[/TD]
[TD="align: right"] * * * *100,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]17[/TD]
[TD="align: center"]0016[/TD]
[TD="align: right"] * *1,000,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]18[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0017[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #cacaca, align: center"]19[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="align: center"]0018[/TD]
[TD="align: right"] * * * * * *1,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]20[/TD]
[TD="align: center"]0019[/TD]
[TD="align: right"] * * * * * *5,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #cacaca, align: center"]21[/TD]
[TD="align: center"]0020[/TD]
[TD="align: right"] * * * * * *3,000 [/TD]
[TD="bgcolor: #ffff00"]*[/TD]
[TD="bgcolor: #ffff00"]*[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
Your help is much appreciated!