#Name? Error

Gerhard7777777

New Member
Joined
Dec 28, 2016
Messages
2
Hi,

I have a column with names in. I want to reflect a certain number connected to the name in the next column.
I have tried numerous formulas which result in a #name? error. This is my formula below. Please help? :confused::confused:


VLOOKUP(W6,TRUE,IFS(W6=Bushbuckridge,"1",Thaba Chweu,"2",Mbombela,"3",Nkomazi,"4",Umjindji,"5",Dr JS Moroka,"6",Thembisile,"7",Victor Khanye,"8",Emalahleni,"9",Steve Tshwete,"10",Emakhazeni,"11",Dipaleseng,"12",Govan Mbeki,"13",Msukaligwa,"14",Albert Luthuli,"15",Lekwa,"16",Pixley Ka Seme,"17",Mkhondo,"18",""))
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

AliGW

Banned
Joined
Mar 9, 2014
Messages
3,628
You need to put the inverted commas around the names, not the numbers. Like this:

=VLOOKUP(W6,TRUE,IFS(W6="Bushbuckridge",1,"Thaba Chweu",2, etc.
 

AliGW

Banned
Joined
Mar 9, 2014
Messages
3,628
Which version of Excel are you using> Does it support the IFS function?
 
Last edited:

AliGW

Banned
Joined
Mar 9, 2014
Messages
3,628
Good point, except it will be this:

=IFS(W6="abc",1,W6="bbb",2, etc.
 

peterhinton

Active Member
Joined
Mar 8, 2016
Messages
336

ADVERTISEMENT

I've never saw or used IFS before, I'm only on 2010, what version was this introduced guys ?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
38,956
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Also note that using TRUE for the second argument of your VLOOKUP won't work.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,167,941
Messages
5,856,425
Members
431,812
Latest member
Elastomers

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