Forum Discussion
vlookup using concatenate function and helper column
Hi - I've set up a table to record project costs.
To save time, there are some standard unit costs that I want to pull through from another tab in the same worksheet.
For example Consultant 'Joe Bloggs' has a day rate of £500. So if the selections from the drop down lists in two of the columns on the costing sheet match 'Joe Bloggs' and 'Consulting Fees' I want the unit cost to automatically populate as £500.
I found a solution that described using the CONCATENATE function to merge two values into a 'helper' column in my look up table. It partially worked, but not all the values were coming through correctly. I've tinkered with it and now none of the values are coming through at all!!
Can anyone spot where I may have gone wrong on the attached file??
(NB: I did try this using IF and AND functions which does work, but the number of variables became too large)
Thank you
Hi Angela,
That's because you use VLOOKUP in the approximate match mode.
So please fix it as follows:
=VLOOKUP((CONCATENATE(B6,C6)),'drop downs'!$A$1:$B$23,2,0)
By setting the last argument to 0 or FALSE, you're now in the Exact match mode.
Hope that helps
4 Replies
- Haytham AmairahSilver Contributor
Hi Angela,
That's because you use VLOOKUP in the approximate match mode.
So please fix it as follows:
=VLOOKUP((CONCATENATE(B6,C6)),'drop downs'!$A$1:$B$23,2,0)
By setting the last argument to 0 or FALSE, you're now in the Exact match mode.
Hope that helps
- Angela McGhinCopper Contributor
That's perfect - thanks so much for the quick and helpful reply!
- Haytham AmairahSilver Contributor
You're welcome!
Anyway, there is a powerful alternative to VLOOKUP called (INDEX & MATCH).
By using this alternative, you don't have to use helper columns.
=INDEX('drop downs'!$A$2:$A$53,INDEX(MATCH(B6&C6,'drop downs'!$B$2:$B$53&'drop downs'!$C$2:$C$53,0),))
Regards,
Haytham