hi folks
I've got 2 x relational tables in 2 x worksheets
sheet1 = a list of companys. The accountnumber field is unique to each row.
sheet2 = a list of phone numbers, there are multiple phone numbers for each account number in this list
so the relationship between the 2 x tables is on the accountnumber field. I've added an instancenumber to define how many phone numbers there are to each account
sheet1 eg
accountnumber company
1 testcompany1
2 testcompany2
3 testcompany3
sheet 2 eg
account Phone instancenumber
1 123456 1
1 234567 2
2 345678 1
3 456789 1
3 012345 2
3 456798 3
3 456788 4
I need to transpose the lists into a flat file so the phonenumbers from sheet2 are linear with the data in sheet1
Sheet1 aim is
accountnumber company Phone1 Phone2 Phone3 Phone4
1 testcompany1 123456 234567
2 testcompany2 345678
3 testcompany3 456789 012345 456798 456788
so I guess for phone1 I need to do a vlookup where accountnumbers match and sheet2 instance = 1 and phone2 a vlookup where accountnumbers match and sheet2 instance = 2
Hope that makes some sense, I can do it in sql if all else fails thoough want to do it in excel ideally
cheers
Matt
Brighton, UK
I've got 2 x relational tables in 2 x worksheets
sheet1 = a list of companys. The accountnumber field is unique to each row.
sheet2 = a list of phone numbers, there are multiple phone numbers for each account number in this list
so the relationship between the 2 x tables is on the accountnumber field. I've added an instancenumber to define how many phone numbers there are to each account
sheet1 eg
accountnumber company
1 testcompany1
2 testcompany2
3 testcompany3
sheet 2 eg
account Phone instancenumber
1 123456 1
1 234567 2
2 345678 1
3 456789 1
3 012345 2
3 456798 3
3 456788 4
I need to transpose the lists into a flat file so the phonenumbers from sheet2 are linear with the data in sheet1
Sheet1 aim is
accountnumber company Phone1 Phone2 Phone3 Phone4
1 testcompany1 123456 234567
2 testcompany2 345678
3 testcompany3 456789 012345 456798 456788
so I guess for phone1 I need to do a vlookup where accountnumbers match and sheet2 instance = 1 and phone2 a vlookup where accountnumbers match and sheet2 instance = 2
Hope that makes some sense, I can do it in sql if all else fails thoough want to do it in excel ideally
cheers
Matt
Brighton, UK