ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to find if a string starts with a digit (https://www.excelbanter.com/excel-worksheet-functions/16138-how-find-if-string-starts-digit.html)

galsaba

How to find if a string starts with a digit
 
I am trying to difrentiate between USA zip codes to Canada Post Codes.
As USA zip codes always start with a digit, and Canada Post code always
start with a letter, what would be the right formula to detect if a
string starts with a digit, or with a letter?

Galsaba


Jason Morin

One way:

=IF(ISERROR(LEFT(A1)*1),"Canada","US")

HTH
Jason
Atlanta, GA

-----Original Message-----
I am trying to difrentiate between USA zip codes to

Canada Post Codes.
As USA zip codes always start with a digit, and Canada

Post code always
start with a letter, what would be the right formula to

detect if a
string starts with a digit, or with a letter?

Galsaba

.



All times are GMT +1. The time now is 04:14 AM.

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