![]() |
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. |
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. |
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. |
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. |
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