Well, the formula to turn LastName, FirstName
to FirstName.LastName
is
RIGHT(Name,LEN(Name)-FIND(' ',Name))&'.'&LEFT(Name,FIND(',',Name)-1)
To change everything to lowercase, simply wrap the above in LOWER()
.
Now, the fun part. To get rid of the '(CORP\XXXXXX)'
you will need to use this:
LEFT(Name,FIND(' (',Name)-1)
(Note there is a space character before the ‘(’ in the above formula.) You can either replace each instance of 'Name'
in the first formula with the formula above or (my recommendation) do this as a two-step process:
- Define a formula field called
{TrimName}
with this formula:
LEFT(Name,FIND(' (',Name)-1)
- Define a formula field called
{User}
with this formula:
LOWER(
RIGHT(TrimName,LEN(TrimName)-
FIND(' ',TrimName))&'.'&LEFT(TrimName,FIND(',',TrimName)-1)
)
(Line-breaks are included just for clarity’s sake; hide {TrimName}
if you prefer.)
The two-step process is, to me, easier to maintain; it may also execute faster. (I’ve not been able to determine if Airtable executes the first formula once and returns the resulting value whenever the field is called by another formula or if it executes the first formula on each call.)
Well, the formula to turn LastName, FirstName
to FirstName.LastName
is
RIGHT(Name,LEN(Name)-FIND(' ',Name))&'.'&LEFT(Name,FIND(',',Name)-1)
To change everything to lowercase, simply wrap the above in LOWER()
.
Now, the fun part. To get rid of the '(CORP\XXXXXX)'
you will need to use this:
LEFT(Name,FIND(' (',Name)-1)
(Note there is a space character before the ‘(’ in the above formula.) You can either replace each instance of 'Name'
in the first formula with the formula above or (my recommendation) do this as a two-step process:
- Define a formula field called
{TrimName}
with this formula:
LEFT(Name,FIND(' (',Name)-1)
- Define a formula field called
{User}
with this formula:
LOWER(
RIGHT(TrimName,LEN(TrimName)-
FIND(' ',TrimName))&'.'&LEFT(TrimName,FIND(',',TrimName)-1)
)
(Line-breaks are included just for clarity’s sake; hide {TrimName}
if you prefer.)
The two-step process is, to me, easier to maintain; it may also execute faster. (I’ve not been able to determine if Airtable executes the first formula once and returns the resulting value whenever the field is called by another formula or if it executes the first formula on each call.)
Thanks very much, I’ll give that a go.