How to use LEN & LEFT on last name to show only 3 letters

D

Darlie Mary

Need syntax to show first 3 letters of last name and first letter of first
name. Also if last name only has 2 letters, need to add a Z on end to make 3
letters.
 
M

M Kan

How are the first and last names separated and do you have any 2-part last
names? Assuming they are in separate cells, the formula would look like this"

A1 = First Name
B1 = Last Name

=IF(LEN(B3)=2,LEFT(B1,3)&"Z",LEFT(B1,3))&LEFT(A1,1)
 
P

Pete_UK

How is your data organised? First_name and Last_name in separate
cells? First_name and Last_name in one cell separated by a space?
Last_name and First_name in one cell separated by a comma and
space? ... ???

Pete
 
D

Darlie Mary

M Kan said:
How are the first and last names separated and do you have any 2-part last
names? Assuming they are in separate cells, the formula would look like this"

A1 = First Name
B1 = Last Name

=IF(LEN(B3)=2,LEFT(B1,3)&"Z",LEFT(B1,3))&LEFT(A1,1)


The entire last name is in Column C and the first name is in Column A.
 
P

Pete_UK

Okay, try this:

=IF(LEN(C2)=2,C2&"Z",LEFT(C2,3))&LEFT(A2,1)

assuming you have a header row so that your data begins in row 2.

Hope this helps.

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top