mudstuffin
Technical User
Hello. Sorry for the waffle you're about to read, but here goes...
I am trying to perform a lookup on a range of data, looking at 2 sets of criteria. I have a list of client reference numbers on sheet1, and on sheet2, I have a list of all the transactions for the clients with a transaction type code. I want to add four columns to the sheet one to lookup the referral codes in sheet2 to the client number for each row, and then flag it if it is one of four that I'm specifically trying to flag up, to then filter.
I.e.
Sheet1 would start like this...
Client 0001 0002 0003 0004
jim
bob
mike
sam
then with the transaction data in Sheet2 like this....
Client
jim 0001
jim 0002
mike 0096
sam 0003
Would give this on Sheet1
Client 0001 0002 0003 0004
jim 1 1
bob
mike
sam 1
(The 1 represents a match as opposed to a count.)
I have managed to do this with sumproduct, by adding a column to the sheet2, and using an if statement to say 'if(referral code cell)<>"",1,0'. The trouble with this way is that it takes a long time, to run all the formulas (45000 transactions from 5000 clients). Is there a quicker and/or better way of doing this. It cannot be done in access, has to be excel....!
If this is confusing and you are willing to have a go, I can email the spreadsheet to you.
What I am trying to achieve is :- cross reference client no to transactions sheet and if has one of four referral codes against any of clients transactions,flag it in the client row in the client sheet. Or basically a vlookup using 2 criteria.
Regards,
mudstuffin
I am trying to perform a lookup on a range of data, looking at 2 sets of criteria. I have a list of client reference numbers on sheet1, and on sheet2, I have a list of all the transactions for the clients with a transaction type code. I want to add four columns to the sheet one to lookup the referral codes in sheet2 to the client number for each row, and then flag it if it is one of four that I'm specifically trying to flag up, to then filter.
I.e.
Sheet1 would start like this...
Client 0001 0002 0003 0004
jim
bob
mike
sam
then with the transaction data in Sheet2 like this....
Client
jim 0001
jim 0002
mike 0096
sam 0003
Would give this on Sheet1
Client 0001 0002 0003 0004
jim 1 1
bob
mike
sam 1
(The 1 represents a match as opposed to a count.)
I have managed to do this with sumproduct, by adding a column to the sheet2, and using an if statement to say 'if(referral code cell)<>"",1,0'. The trouble with this way is that it takes a long time, to run all the formulas (45000 transactions from 5000 clients). Is there a quicker and/or better way of doing this. It cannot be done in access, has to be excel....!
If this is confusing and you are willing to have a go, I can email the spreadsheet to you.
What I am trying to achieve is :- cross reference client no to transactions sheet and if has one of four referral codes against any of clients transactions,flag it in the client row in the client sheet. Or basically a vlookup using 2 criteria.
Regards,
mudstuffin