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

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)

Habtest

Board Regular
Joined
Jul 30, 2020
Messages
156
Office Version
  1. 365
Platform
  1. Windows
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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
56,816
Office Version
  1. 365
Platform
  1. Windows
Hi & welcome to MrExcel.
Maybe
Excel Formula:
=xlookup([@level],sheet2!g:g,sheet2!j:j,"na",0)
 

Watch MrExcel Video

Forum statistics

Threads
1,130,083
Messages
5,639,980
Members
417,121
Latest member
DallyDally

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
Top