ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   1 will be City, 2 will be Roskill and so on please. (https://www.excelbanter.com/excel-worksheet-functions/40569-1-will-city-2-will-roskill-so-please.html)

Steved

1 will be City, 2 will be Roskill and so on please.
 
Hello from Steved

Numbers 1234, 1543, 1674, 1896 A formula please to use 1st digit to be
identifier
which in this case is 1 so will return the value City

Numbers 2234, 2543, 2674, 2896 A formula please to use 1st digit to be
identifier
which in this case is 2 so will return the value Roskill

Thankyou.

Ashish Mathur

Hi,

Use the Left function

=left(cell reference,1)

Regards,

Ashish

"Steved" wrote:

Hello from Steved

Numbers 1234, 1543, 1674, 1896 A formula please to use 1st digit to be
identifier
which in this case is 1 so will return the value City

Numbers 2234, 2543, 2674, 2896 A formula please to use 1st digit to be
identifier
which in this case is 2 so will return the value Roskill

Thankyou.


Max

One way ..

Assuming you have set-up the reference table
in Sheet1, cols A & B, from row1 down as:

1 City
2 Roskill
etc

Then in another sheet, say, Sheet2, if the numbers:
1234, 1543, 1674, 2234, 2543, 2674 etc are in A1 down,
we could put in say, B1:

=IF(A1="","",IF(ISNA(MATCH(LEFT(TRIM(A1))+0,Sheet1 !A:A,0)),"No
match",VLOOKUP(LEFT(TRIM(A1))+0,Sheet1!A:B,2,0)))

and copy B1 down

Col B will return the desired results

Unmatched cases, if any, will return the phrase: No match
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Steved" wrote in message
...
Hello from Steved

Numbers 1234, 1543, 1674, 1896 A formula please to use 1st digit to be
identifier
which in this case is 1 so will return the value City

Numbers 2234, 2543, 2674, 2896 A formula please to use 1st digit to be
identifier
which in this case is 2 so will return the value Roskill

Thankyou.




Steved

Hello Max from Steved

This is just what I am requiring as I have over 10 Cities and your good
formula will do the job nicely

I thankyou for your time on my issue.



"Max" wrote:

One way ..

Assuming you have set-up the reference table
in Sheet1, cols A & B, from row1 down as:

1 City
2 Roskill
etc

Then in another sheet, say, Sheet2, if the numbers:
1234, 1543, 1674, 2234, 2543, 2674 etc are in A1 down,
we could put in say, B1:

=IF(A1="","",IF(ISNA(MATCH(LEFT(TRIM(A1))+0,Sheet1 !A:A,0)),"No
match",VLOOKUP(LEFT(TRIM(A1))+0,Sheet1!A:B,2,0)))

and copy B1 down

Col B will return the desired results

Unmatched cases, if any, will return the phrase: No match
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Steved" wrote in message
...
Hello from Steved

Numbers 1234, 1543, 1674, 1896 A formula please to use 1st digit to be
identifier
which in this case is 1 so will return the value City

Numbers 2234, 2543, 2674, 2896 A formula please to use 1st digit to be
identifier
which in this case is 2 so will return the value Roskill

Thankyou.





Max

Glad it helped, Steved !
--
Rgds
Max
xl 97
---
Singapore, GMT+8
xdemechanik
http://savefile.com/projects/236895
--
"Steved" wrote in message
...
Hello Max from Steved

This is just what I am requiring as I have over 10 Cities and your good
formula will do the job nicely

I thankyou for your time on my issue.





All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com