ismphoto123
New Member
- Joined
- Nov 2, 2015
- Messages
- 13
Hello,
I have been stuck on this project for weeks. There are six sheets. One named 'Macro' that will have instructions and command buttons, 'Results' where the data would populate, and APAR, MBS, Purchase, and Sales. So the common identifier is the CUSIP. Not all sheets will have the same cusips, but the first two columns 'CUSIP' and 'Asset Description' are the same and the third column contains the value. What I am intending to do is populate the results tab with all CUSIPs and Asset Description's without duplicates. Then I would like the macro to look through CUSIPS in the last four sheets and return the value from the third column of that sheet into the corresponding column in the Results tab.
Below is an example of the Results tab and an APAR (which has the same layout, and just a different column header which is the same column header as Results tab). Thank you in advance for your help! I also have to add more sheets and more columns to the Results sheet, this is just a simplified version.
[TABLE="width: 471"]
<colgroup><col><col><col span="4"></colgroup><tbody>[TR]
[TD]CUSIP[/TD]
[TD]Asset Description [/TD]
[TD] APAR[/TD]
[TD] MBS[/TD]
[TD] Purchase[/TD]
[TD] Sales[/TD]
[/TR]
[TR]
[TD="align: right"]111111111 [/TD]
[TD]this1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD="align: right"]222222222 [/TD]
[TD]this2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]27[/TD]
[/TR]
[TR]
[TD="align: right"]333333333 [/TD]
[TD]this3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]12[/TD]
[TD][/TD]
[TD="align: right"]28[/TD]
[/TR]
[TR]
[TD="align: right"]444444444 [/TD]
[TD]this4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD="align: right"]555555555 [/TD]
[TD]this5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]30[/TD]
[/TR]
[TR]
[TD="align: right"]666666666 [/TD]
[TD]this6[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]31[/TD]
[/TR]
[TR]
[TD="align: right"]777777777 [/TD]
[TD]this7[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]32[/TD]
[/TR]
[TR]
[TD="align: right"]888888888 [/TD]
[TD]this8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]33[/TD]
[/TR]
[TR]
[TD="align: right"]999999999 [/TD]
[TD]this9[/TD]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]34[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 314"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]CUSIP[/TD]
[TD]Asset Description[/TD]
[TD]APAR[/TD]
[/TR]
[TR]
[TD="align: right"]111111111 [/TD]
[TD]this1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]222222222 [/TD]
[TD]this2[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]333333333 [/TD]
[TD]this3[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]444444444 [/TD]
[TD]this4[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]555555555 [/TD]
[TD]this5[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]666666666 [/TD]
[TD]this6[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]777777777 [/TD]
[TD]this7[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]888888888 [/TD]
[TD]this8[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD="align: right"]999999999 [/TD]
[TD]this9[/TD]
[TD="align: right"]9[/TD]
[/TR]
</tbody>[/TABLE]
I have been stuck on this project for weeks. There are six sheets. One named 'Macro' that will have instructions and command buttons, 'Results' where the data would populate, and APAR, MBS, Purchase, and Sales. So the common identifier is the CUSIP. Not all sheets will have the same cusips, but the first two columns 'CUSIP' and 'Asset Description' are the same and the third column contains the value. What I am intending to do is populate the results tab with all CUSIPs and Asset Description's without duplicates. Then I would like the macro to look through CUSIPS in the last four sheets and return the value from the third column of that sheet into the corresponding column in the Results tab.
Below is an example of the Results tab and an APAR (which has the same layout, and just a different column header which is the same column header as Results tab). Thank you in advance for your help! I also have to add more sheets and more columns to the Results sheet, this is just a simplified version.
[TABLE="width: 471"]
<colgroup><col><col><col span="4"></colgroup><tbody>[TR]
[TD]CUSIP[/TD]
[TD]Asset Description [/TD]
[TD] APAR[/TD]
[TD] MBS[/TD]
[TD] Purchase[/TD]
[TD] Sales[/TD]
[/TR]
[TR]
[TD="align: right"]111111111 [/TD]
[TD]this1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]26[/TD]
[/TR]
[TR]
[TD="align: right"]222222222 [/TD]
[TD]this2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]11[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]27[/TD]
[/TR]
[TR]
[TD="align: right"]333333333 [/TD]
[TD]this3[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]12[/TD]
[TD][/TD]
[TD="align: right"]28[/TD]
[/TR]
[TR]
[TD="align: right"]444444444 [/TD]
[TD]this4[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]29[/TD]
[/TR]
[TR]
[TD="align: right"]555555555 [/TD]
[TD]this5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]21[/TD]
[TD="align: right"]30[/TD]
[/TR]
[TR]
[TD="align: right"]666666666 [/TD]
[TD]this6[/TD]
[TD="align: right"]6[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]22[/TD]
[TD="align: right"]31[/TD]
[/TR]
[TR]
[TD="align: right"]777777777 [/TD]
[TD]this7[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]16[/TD]
[TD="align: right"]23[/TD]
[TD="align: right"]32[/TD]
[/TR]
[TR]
[TD="align: right"]888888888 [/TD]
[TD]this8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]24[/TD]
[TD="align: right"]33[/TD]
[/TR]
[TR]
[TD="align: right"]999999999 [/TD]
[TD]this9[/TD]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]34[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 314"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]CUSIP[/TD]
[TD]Asset Description[/TD]
[TD]APAR[/TD]
[/TR]
[TR]
[TD="align: right"]111111111 [/TD]
[TD]this1[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]222222222 [/TD]
[TD]this2[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]333333333 [/TD]
[TD]this3[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD="align: right"]444444444 [/TD]
[TD]this4[/TD]
[TD="align: right"]4[/TD]
[/TR]
[TR]
[TD="align: right"]555555555 [/TD]
[TD]this5[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]666666666 [/TD]
[TD]this6[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]777777777 [/TD]
[TD]this7[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]888888888 [/TD]
[TD]this8[/TD]
[TD="align: right"]8[/TD]
[/TR]
[TR]
[TD="align: right"]999999999 [/TD]
[TD]this9[/TD]
[TD="align: right"]9[/TD]
[/TR]
</tbody>[/TABLE]