vlookup to return 3 different columns

Jane Fischer

Board Regular
Joined
Feb 6, 2006
Messages
85
I do a vlookup to return 2 different columns depending on the value found. I need to add a 3rd column but am not sure the best way to do it. This is my current formula but now need to include column 6. Can someone help me figure this out?

=IFERROR(VLOOKUP(A2,'\\swfs04v01\fwal1shr\Plant-0\Finance\Other\WGS\[WGS P5 and TC Grinding Cost.xlsx]Sheet1'!$A$3:$E$974,4+(B2<"WGSTC"),0),0)

If B2=WGSTC return column 4
If B2=WGSP5 return column 5
If B2=WGSBS return column 6
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Perhaps:

=IFERROR(VLOOKUP(A2,'\\swfs04v01\fwal1shr\Plant-0\Finance\Other\WGS\[WGS P5 and TC Grinding Cost.xlsx]Sheet1'!$A$3:$E$974,INDEX({4,5,6},MATCH(B2,{"WGSTC","WGSP5","WGSBS"},0)),0),0)
 
Upvote 0
I do a vlookup to return 2 different columns depending on the value found. I need to add a 3rd column but am not sure the best way to do it. This is my current formula but now need to include column 6. Can someone help me figure this out?

=IFERROR(VLOOKUP(A2,'\\swfs04v01\fwal1shr\Plant-0\Finance\Other\WGS\[WGS P5 and TC Grinding Cost.xlsx]Sheet1'!$A$3:$E$974,4+(B2<"WGSTC"),0),0)

If B2=WGSTC return column 4
If B2=WGSP5 return column 5
If B2=WGSBS return column 6
But your table array only has 5 columns! ;)
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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