VLOOKUP multiple columns in a Named Range on a separate sheet

steve.waye

Board Regular
Joined
Jul 8, 2010
Messages
68
Hi,

I have the following table on a spreadsheet...

1608273895446.png


I need to automatically insert a text string in the "Units" column based on the values in the "Course", "Elective" and "Stage" columns.

I have created the named range "Workplace_Delivery" on a hidden sheet as follows...

1608274105334.png



I'm using the equation below but I'm getting a #SPILL! error...

=VLOOKUP([Course]&[Elective]&[Stage],Workplace_Delivery,4,FALSE)

Any help would be appreciated.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
You're getting the #SPILL error because you're looking up entire columns, e.g. [Course] rather than single values [@Course]. You're also concatenating [Course], [Elective] and [Stage] into a single lookup_value but trying to match across multiple columns in Workplace_Delivery.

There are different ways you could do this. Here's one that should work:

=FILTER(INDEX(Workplace_Delivery,,4),([@Course]=INDEX(Workplace_Delivery,,1))*([@Elective]=INDEX(Workplace_Delivery,,2))*([@Stage]=INDEX(Workplace_Delivery,,3)),"Not found")
 
Upvote 0
Solution
Doh. The [Course] verses [@Course] error was an oversight. Stupid mistake. ?

I like what you did with FILTER though. Thanks for the help. :)
 
Upvote 0

Forum statistics

Threads
1,214,919
Messages
6,122,259
Members
449,075
Latest member
staticfluids

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