Conditional vlookups?

L

Legacy 262721

Guest
Hi.
I'm trying to process Customer History data in a spreadsheet for importing into another program, but the problem is that I have the same customers appearing in multiple rows if we've serviced them more than once. What I need is to have a single row for each customer, with their data for 2010, 2011, 2012 and 2013 contained within that single row.
I've tried using IFs and VLOOKUPs, but I only get the first instance of the customer appearing in the result, not the entry appropriate to the year of the column. I've been reading about array formulas, but the explanations are as baffling as the formulas themselves. Can anybody advise?

This is what I have:
CustomerJob NumberJob DateInvoice Date
Geoff10001/01/1002/01/10
Geoff10301/01/1102/01/11
Tim10202/02/1003/02/10
Tim10403/03/1104/03/11

<tbody>
</tbody>

This is what I need:
Customer2010 Job number2010 Job date2010 Invoice date2011 Job Number2011 Job Date2011 Invoice date
Geoff10001/01/1002/01/1010301/01/1102/01/11
Tim10202/02/1003/02/1010403/03/1104/03/11

<tbody>
</tbody>

I'd do it manually, but there are over 3,000 entries and it would take a far too long. Any help would be appreciated.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hello, I use the formula =IF($A:$A="","",VLOOKUP($A:$A,$Z$1:$AJ$80,2,FALSE)) for something similar. $A:$A would be the coulmn with the persons name. $Z$1:$AJ:80 is the table with all the info, you will need to change this to the cells you store the information. 2 would return the info in column 2 of your table, in your example this would be Job number.

So if in one cloumn you have a 2 to result in job number in the next you would use 3 to return the job date, 4 to return invoice date.

*In cell G2 you use =IF($A:$A="","",VLOOKUP($A:$A,$Z$1:$AJ$80,3,FALSE))
*in Cell G3 you use =IF($A:$A="","",VLOOKUP($A:$A,$Z$1:$AJ$80,4,FALSE))
*in Cell G4 you use =IF($A:$A="","",VLOOKUP($A:$A,$Z$1:$AJ$80,5,FALSE))

*The IF statement just keeps the cell blank if noting is entered.
 
Last edited:
Upvote 0
That's great, thanks, much closer, so close I can almost taste it... BUT!

...I'm still getting only the first result the vlookup finds in the column, and not the date-appropriate result. I know you can constrain formulas according to the cell containing a certain date using an ISNUMBER(SEARCH formula, but I can't find where to insert that in your formula.

Any ideas?
 
Upvote 0

Forum statistics

Threads
1,215,493
Messages
6,125,131
Members
449,206
Latest member
burgsrus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top