# Combining IF and VLOOKUP

#### jonnyjack27

##### New Member
16. 16/05/2009. H09/5941. A1 HE. 1

Hi, I've got a row in my table as shown above(full stop indicates a new column).

I am trying to combine IF and VLOOKUP to find this row and search the 4th column (A1 HE in this case). I then want the formula to return a "YES" if the cell contains A1 HE and a "NO" if it doesn't.

My forumla below is showing #NAME!

=IF(VLOOKUP(16,'[LAMIOS-18..8.09.xls]Sheet1'!\$A\$5:\$E\$31,4,FALSE) =A1 HE,"YES","NO")

The "A1" part of A1 HE is highlighting cell A1, however I don't believe this is the only problem. Would somebody be able to help. Many thanks.

### Excel Facts

Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi,

Welcome to the board.

Try:

=IF(VLOOKUP(A1,'[LAMIOS-18..8.09.xls]Sheet1'!\$A\$5:\$E\$31,4,FALSE) ="A1 HE","YES","NO")

Changes are bold and underlined - Change A1 to whatever cell the value is in.

Thank you very much. The quotations around A1 HE worked. I didn't have to change the 16 to a cell.

I'm trying to teach myself VLOOKUPS and SUMIFS for an interview tomorrow, although they haven't told me how advanced the forumlas will be. Are there any websites that have questions so that I can practice these techniques? I'm on a mac so I can't download Ribbon Hero, which I have heard is useful.

Replies
4
Views
221
Replies
4
Views
519
Replies
11
Views
2K
Replies
1
Views
740
Replies
10
Views
926
Legacy 143009
L

1,217,386
Messages
6,136,283
Members
450,002
Latest member
bybynhoc

### 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.

### Which adblocker are you using?

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

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