Xlookup (maybe)

Kurstenq

New Member
Joined
May 4, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,
I’m learning excel, and still quite new to writing formulas, so forgive me if this a stupid question. I’m just having no luck and my knowledge is limited.
I have a task that requires me to pull a grade code using an employee number from one worksheet and including it into another worksheet.
I’m trying to use an xlookup, by using the employee number from as my lookup array, the grade code as my return array and my result is 0. I was getting an error so hopefully I’m heading in the right direction.
formula: =xlookup([level],sheet2!g:g,sheet2!j:j,na,0)

I feel like maybe I need an if statement? But the xlookup wouldn’t allow it. Any help is greatly appreciated!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Do you want it to return "na" if the employee number is not found? Try quote the na in formula
Excel Formula:
=xlookup([level],sheet2!g:g,sheet2!j:j,"na",0)

If the error remains, please upload your sample data/sheet by using XL2BB
 
Upvote 0
Hi & welcome to MrExcel.
Maybe
Excel Formula:
=xlookup([@level],sheet2!g:g,sheet2!j:j,"na",0)
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,200
Members
449,072
Latest member
DW Draft

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