Skip to main content
I am trying to create a custom formula field on the account object that displays a person's name based on the first letter of the Account Name.

 

I tried starting with the below and tried editing them (including using OR), but neither seems to work and I am not sure how else to do this.

 

IF(BEGINS("A:B:C:D:E:F:G,Name), "Annie",

 

IF(BEGINS("H:I:J:K:L:M", Name), "Lisa",

 

IF(BEGINS("N:O:P:Q:R:S,", Name), "Stephanie",

 

IF(BEGINS("T:U:V:W:X:Y:Z", Name), "Paula",

 

IF(BEGINS("2:3:4:5:6:7:':#:*:@", Name), "Julie", "Unknown"))))))

 

IF(LEFT( Name,1)="A:B:C:D:E:F:G,"Annie",IF(LEFT(Name,1)="H:I:J:K:L:M", "Lisa",IF(LEFT(Name,1)="N:O:P:Q:R:S,","Stephanie",IF(LEFT(Name,1)="T:U:V:W:X:Y:Z", "Paula",IF(LEFT(Name,1)="2:3:4:5:6:7:':#:*:@", "Julie", "Unknown"))))))

9 respostas
  1. 14 de set. de 2011, 00:19

    While the above did not return any syntax errors, any option only returned an "error" in the field. I instead used the LEFT feature for the below (however it is case sensitive, and adding the lower case letters maxes out, so I have to create a rule that requires a capital letter on the first name)

     

    IF(LEFT(Name, 1) ="A", "RepA",

     

    IF(LEFT(Name, 1) ="B", "RepA",

     

    IF(LEFT(Name, 1) ="C", "RepB",

     

    IF(LEFT(Name, 1) ="D", "RepB",

     

    IF(LEFT(Name, 1) ="E", "RepB",

     

    IF(LEFT(Name, 1) ="F", "RepA",

     

    IF(LEFT(Name, 1) ="G", "RepC",

     

    IF(LEFT(Name, 1) ="H", "RepC",

     

    IF(LEFT(Name, 1) ="I", "RepC",

     

    IF(LEFT(Name, 1) ="J", "RepC",

     

    IF(LEFT(Name, 1) ="K", "RepA",

     

    IF(LEFT(Name, 1) ="L", "RepD",

     

    IF(LEFT(Name, 1) ="M", "RepC",

     

    IF(LEFT(Name, 1) ="N", "RepD",

     

    IF(LEFT(Name, 1) ="O", "RepC",

     

    IF(LEFT(Name, 1) ="P", "RepD",

     

    IF(LEFT(Name, 1) ="Q", "RepD",

     

    IF(LEFT(Name, 1) ="R", "RepB",

     

    IF(LEFT(Name, 1) ="S", "RepD",

     

    IF(LEFT(Name, 1) ="T", "RepE",

     

    IF(LEFT(Name, 1) ="U", "RepE",

     

    IF(LEFT(Name, 1) ="V", "RepE",

     

    IF(LEFT(Name, 1) ="W", "RepD",

     

    IF(LEFT(Name, 1) ="X", "RepE",

     

    IF(LEFT(Name, 1) ="Y", "RepD",

     

    IF(LEFT(Name, 1) ="Z", "RepA",

     

    IF(LEFT(Name, 1) ="#", "RepA",

     

    IF(LEFT(Name, 1) ="'", "RepA",

     

    IF(LEFT(Name, 1) ="1", "RepA",

     

    IF(LEFT(Name, 1) ="3", "RepA",

     

    IF(LEFT(Name, 1) ="7", "RepA",

     

    IF(LEFT(Name, 1) ="9", "RepA","Error"))))))))))))))))))))))))))))))))
0/9000