Nested LEFT/IF statement

  • Thread starter Thread starter George Wilson
  • Start date Start date
G

George Wilson

I am assisting a customer using Excel XP on a Windows XP
computer. I have a column with a country code that has
varous text afterwards, example A.01various text. I want
to check for the country code =LEFT(a1,4) to return the
A.01 value and then some how compare it to a list of
values and assign the proper country name, =if(LEFT(a1,4)
=A.01, Albania)I have a long list of countries so maybe
the if statement is the wrong one to use, can anyone think
of a way to return this country name based on the =LEFT
value set in a certain cell?
TIA
George
 
Hi George
if your list of country codes is in the range X1:Y100 you may use the
following
=VLOOKUP(LEFT(A1,4),$A$1:$Y$1000,2,0)
 
VLOOKUP worked fine, thank you...
George
-----Original Message-----
Hi George
if your list of country codes is in the range X1:Y100 you may use the
following
=VLOOKUP(LEFT(A1,4),$A$1:$Y$1000,2,0)

--
Regards
Frank Kabel
Frankfurt, Germany

Newsbeitrag news:[email protected]...

.
 
Back
Top