The situation I have is unique and I need you guys help on resolving it.
I have two sets of data files:
This master file has all the headings reported on first and second file. The macro needs to consolidate the details from the first and second file based on the customer relationship number. The macro also has to make sure that the right details are pulled from the right column.
For e.g. if phone number of XYZ is on column L of the 2nd file and credit card number is on column G of the 1st file, the macro should pull these two details from the 1st and 2nd file and compile it under the same headings within “compiled data” tab of Masterfile. One thing I should say is that Credit card number and phone number will not be in column L and column G in Masterfile. The credit card number is in column C and phone number is in column N as shown below. I am not sure whether this information is relevant but I just wanted to share it with you.
[TABLE="width: 1218"]
<tbody>[TR]
[TD="class: xl66, width: 87"]A[/TD]
[TD="class: xl66, width: 87"]B[/TD]
[TD="class: xl66, width: 87"]C[/TD]
[TD="class: xl66, width: 87"]D[/TD]
[TD="class: xl66, width: 87"]E[/TD]
[TD="class: xl66, width: 87"]F[/TD]
[TD="class: xl66, width: 87"]G[/TD]
[TD="class: xl66, width: 87"]H[/TD]
[TD="class: xl66, width: 87"]I[/TD]
[TD="class: xl66, width: 87"]J[/TD]
[TD="class: xl66, width: 87"]K[/TD]
[TD="class: xl66, width: 87"]L[/TD]
[TD="class: xl66, width: 87"]M[/TD]
[TD="class: xl66, width: 87"]N[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]Customer Relationship Number[/TD]
[TD="class: xl66, width: 87"]Customer name[/TD]
[TD="class: xl66, width: 87"] address[/TD]
[TD="class: xl66, width: 87"]Credit Card Number[/TD]
[TD="class: xl66, width: 87"]Bank Account Number[/TD]
[TD="class: xl66, width: 87"]Begin Date[/TD]
[TD="class: xl66, width: 87"]Loan Application Yes/No[/TD]
[TD="class: xl66, width: 87"]Expiry Date[/TD]
[TD="class: xl66, width: 87"]Outstanding Balance[/TD]
[TD="class: xl66, width: 87"]Maximum Balance[/TD]
[TD="class: xl66, width: 87"]Current Balance[/TD]
[TD="class: xl66, width: 87"]Current Account Balance[/TD]
[TD="class: xl66, width: 87"] e-mail id[/TD]
[TD="class: xl66, width: 87"]Phone number[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]23675[/TD]
[TD="class: xl66, width: 87"]XYZ[/TD]
[TD="class: xl66, width: 87"]ABC Villa, DEF street, US[/TD]
[TD="class: xl66, width: 87"]1234-56-78-9000[/TD]
[TD="class: xl66, width: 87"]686394698[/TD]
[TD="class: xl67, width: 87"]9/24/2016[/TD]
[TD="class: xl66, width: 87"]No[/TD]
[TD="class: xl67, width: 87"]9/24/2020[/TD]
[TD="class: xl66, width: 87"]20000[/TD]
[TD="class: xl66, width: 87"]100000[/TD]
[TD="class: xl66, width: 87"]80000[/TD]
[TD="class: xl66, width: 87"]174720[/TD]
[TD="class: xl68, width: 87"]xxx@hjtu@thisistest.com[/TD]
[TD="class: xl66, width: 87"]1-212-00-000[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]First and second file[/TD]
[TD="class: xl66, width: 87"]First and second file[/TD]
[TD="class: xl66, width: 87"]Second file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]Second file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[/TR]
</tbody>[/TABLE]
I hope I made it clear for you guys. Please let me know if you require any additional information.
I have two sets of data files:
- First file has a lot of details such as the credit card number, the begin and expiry date of the credit card, outstanding balance, maximum balance available, current balance available, customer name and a customer relationship number. This customer relationship number is a unique number and is never assigned to another customer.
- Second file has additional details such as the customer name, bank account number, current account balance, Loan application Yes/No, Phone number, address, e-mail id and customer relationship number. This customer relationship number is the same as the one on the first file.
For e.g. If customer XYZ has been assigned a relationship number of 23675 in the first file, that same customer relationship number is reported for XYZ on file 2.
This master file has all the headings reported on first and second file. The macro needs to consolidate the details from the first and second file based on the customer relationship number. The macro also has to make sure that the right details are pulled from the right column.
For e.g. if phone number of XYZ is on column L of the 2nd file and credit card number is on column G of the 1st file, the macro should pull these two details from the 1st and 2nd file and compile it under the same headings within “compiled data” tab of Masterfile. One thing I should say is that Credit card number and phone number will not be in column L and column G in Masterfile. The credit card number is in column C and phone number is in column N as shown below. I am not sure whether this information is relevant but I just wanted to share it with you.
[TABLE="width: 1218"]
<tbody>[TR]
[TD="class: xl66, width: 87"]A[/TD]
[TD="class: xl66, width: 87"]B[/TD]
[TD="class: xl66, width: 87"]C[/TD]
[TD="class: xl66, width: 87"]D[/TD]
[TD="class: xl66, width: 87"]E[/TD]
[TD="class: xl66, width: 87"]F[/TD]
[TD="class: xl66, width: 87"]G[/TD]
[TD="class: xl66, width: 87"]H[/TD]
[TD="class: xl66, width: 87"]I[/TD]
[TD="class: xl66, width: 87"]J[/TD]
[TD="class: xl66, width: 87"]K[/TD]
[TD="class: xl66, width: 87"]L[/TD]
[TD="class: xl66, width: 87"]M[/TD]
[TD="class: xl66, width: 87"]N[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]Customer Relationship Number[/TD]
[TD="class: xl66, width: 87"]Customer name[/TD]
[TD="class: xl66, width: 87"] address[/TD]
[TD="class: xl66, width: 87"]Credit Card Number[/TD]
[TD="class: xl66, width: 87"]Bank Account Number[/TD]
[TD="class: xl66, width: 87"]Begin Date[/TD]
[TD="class: xl66, width: 87"]Loan Application Yes/No[/TD]
[TD="class: xl66, width: 87"]Expiry Date[/TD]
[TD="class: xl66, width: 87"]Outstanding Balance[/TD]
[TD="class: xl66, width: 87"]Maximum Balance[/TD]
[TD="class: xl66, width: 87"]Current Balance[/TD]
[TD="class: xl66, width: 87"]Current Account Balance[/TD]
[TD="class: xl66, width: 87"] e-mail id[/TD]
[TD="class: xl66, width: 87"]Phone number[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]23675[/TD]
[TD="class: xl66, width: 87"]XYZ[/TD]
[TD="class: xl66, width: 87"]ABC Villa, DEF street, US[/TD]
[TD="class: xl66, width: 87"]1234-56-78-9000[/TD]
[TD="class: xl66, width: 87"]686394698[/TD]
[TD="class: xl67, width: 87"]9/24/2016[/TD]
[TD="class: xl66, width: 87"]No[/TD]
[TD="class: xl67, width: 87"]9/24/2020[/TD]
[TD="class: xl66, width: 87"]20000[/TD]
[TD="class: xl66, width: 87"]100000[/TD]
[TD="class: xl66, width: 87"]80000[/TD]
[TD="class: xl66, width: 87"]174720[/TD]
[TD="class: xl68, width: 87"]xxx@hjtu@thisistest.com[/TD]
[TD="class: xl66, width: 87"]1-212-00-000[/TD]
[/TR]
[TR]
[TD="class: xl66, width: 87"]First and second file[/TD]
[TD="class: xl66, width: 87"]First and second file[/TD]
[TD="class: xl66, width: 87"]Second file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]Second file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]First file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[TD="class: xl66, width: 87"]second file[/TD]
[/TR]
</tbody>[/TABLE]
I hope I made it clear for you guys. Please let me know if you require any additional information.