View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default assigning numbers to companies

maybe something like this:

Function GetCompanyID(strCompany As String) As String
If Left(UCase(strCompany), 1) = "A" Or Left(UCase(strCompany), 2) = "GR"
Then
GetCompanyID = "01"
End If
End Function



--

Hope that helps.

Vergel Adriano


"jamesea" wrote:

I need to assign companies to one of four different numbers depending on
where they fall in the alphabet, for example I need to assign a company "care
homes ltd" as 01. Any ideas on the formula?


01 A GR
02 GS SA
03 SB THEC
04 THED Z