#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",""))
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

AliGW

.
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

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

AliGW

.
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
36,065
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,371
Messages
5,595,782
Members
414,020
Latest member
Meghdad

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