Excel Help requested with Excel date formatting

Joined
Nov 20, 2006
Messages
4
Reaction score
0
Greetings! I am working in a spreadsheet with variables for first name, last name, and birth date (mm/dd/yyyy). My goal is to create a new 10-digit variable that combines the first letter of the first name, first letter of the last name, and the eight digits of the birth date without the slashes.

I take care of the letters with the formula "=LEFT(A1,1)&LEFT(B1,1)." However, I am unable to change the mm/dd/yyyy format to mmddyyyy and add it to the 2 letters without the date changing to its serial equivalent (e.g., 5/16/1973 becomes 26800). I want to use a formula to create the new variable without manually changing all of the dates.

I would appreciate any assistance. Thank you!
 
Joined
Nov 20, 2006
Messages
4
Reaction score
0
Resolution to date formatting

After further research, I discovered the following answer to my request:

=LEFT(A1,1)&LEFT(B1,1)&TEXT((MONTH(C1)),"00")&TEXT((DAY(C1)),"00")&YEAR(C1)

Per this formula, the date fields need to be formatted as text to allow for the leading zeros. All is well!
 

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