Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Steved
 
Posts: n/a
Default 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.
  #2   Report Post  
Ashish Mathur
 
Posts: n/a
Default

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.

  #3   Report Post  
Max
 
Posts: n/a
Default

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.



  #4   Report Post  
Steved
 
Posts: n/a
Default

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.




  #5   Report Post  
Max
 
Posts: n/a
Default

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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"