Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign a desired text output based on the first character of a field 1

Status
Not open for further replies.

DeniseF1204

Technical User
Joined
Jun 21, 2007
Messages
1
Location
US
I'm using a field named (USERDEF2) that generates the following information:

1usABC
2usABC
3usABC
4usABC

I want to create a formula that can help me generate the following output:

if USERDEF2 field begins with the #1 (Example:1usABC) then I want "CompanyName1" to appear.

if USERDEF2 field begins with the #2 (Example:2usABC) then I want "CompanyName2" to appear.

if USERDEF2 field begins with the #3 (Example:3usABC) then I want "CompanyName3" to appear.

if USERDEF2 field begins with the #4 (Example:4usABC) then I want "CompanyName4" to appear.


Your suggestions are appreciated.

Thank you.
 
Create a formula:

select {table.USERDEF2}[1]
case "1" : "CompanyName1"
case "2" : "CompanyName2" //etc.
default : ""

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top