Vlookup not returning the right column

Bandito1

Board Regular
Joined
Oct 18, 2018
Messages
233
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I use Vlookup to return data from different column.

I can't use xl2bb since my excel crashes then..
So i hope i can make it clear with pictures

On 1 sheet i have the lookup
In column B is a formula that looks if the number is in the list on the sheet 2016-2022.
=IF(A2="";"";IF(ISNA(VLOOKUP(SUBSTITUTE(A2;"G";"")+0;'2016-2022'!B:B;1;FALSE));"No";"Yes"))

That works
It shows Yes if it's in the list and No if it isn't
Gel lookup.PNG


In the column next to it (column C) i want to return the value that is in column J of the sheet 2016-2022; "Cancelled"

I use the formula =IFERROR(VLOOKUP(A2;'2016-2022'!A:J;10;FALSE);"No comments") for it.

But it always returns "No comments"

I played with the column index number but it always shows "No comments"
2016-2022.PNG


Sorry for not using xl2bb again but the file crashes when i try to.

Someone knows what im doing wrong?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
TRY

IF(ISERROR(VLOOKUP(A2;'2016-2022'!A:J;10;FALSE),"No comments",VLOOKUP(A2;'2016-2022'!A:J;10;FALSE))
 
Upvote 0
How about
Excel Formula:
=IFERROR(VLOOKUP(A2;'2016-2022'!B:J;9;FALSE);"No comments")
 
Upvote 0
I would be embarrassed if that was the solution.
Tried 8, 9, 10, 11 but all return "no comments" while it shouldn't

It looks like it gives error all the time since "no comments" should show when value_if_error?
 
Upvote 0
Make sure that A2 & column B are all numbers, or all text.
 
Upvote 0
It works, thing i did wrong is that my range was still A:J instead of B:J
Don't know why this causes the error..
You can explain me that?

Also it displays "0" if there are no comments and not the words "no comments"
 
Upvote 0
Vlookup looks for the value in the 1st column of the lookup range.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,862
Members
449,052
Latest member
Fuddy_Duddy

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