Custom Format-- date question

araymc

New Member
Joined
Oct 10, 2011
Messages
7
I need to take

9/10/1995

and custom format to appear as

S101995

I can't figure out how to on my custom formatting.

Anyone?

Thanks...
Anita
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,437
In your example date 09/10/1995, if 10 is the month...
"S"mmyyyy

Or if 10 is the day...
"S"ddyyyy
 

CMDMA03

New Member
Joined
Sep 23, 2011
Messages
12
Here is a formula that will get you what you want:

=LEFT(TEXT(A8,"MMM"),1)&TEXT(A8,"DD")&TEXT(A8,"YYYY")
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows

ADVERTISEMENT

Here's another formula:

=LEFT(TEXT(A1,"mmm"))&TEXT(A1,"ddyyyy")
 

araymc

New Member
Joined
Oct 10, 2011
Messages
7
Thanks to all who have responded so quickly.

Yes the 9 is equivalent to September.

I know I will have more questions as my work role has changed somewhat and I love to take what little I do know about Excel and push it to streamline the work to go FASTER! LOL It's a wonderful little secret to make your workday go smoother.

Anita
 

araymc

New Member
Joined
Oct 10, 2011
Messages
7

ADVERTISEMENT

Well, dang it! Now I have been thrown a curve ball. If the day is only 1 digit I don't need a zero to show up.

Original data
9/01/2011

after formula as is
S012011

needs to be
S12011

Sorry to be a pain! I should have read the email from co-worker more thoroughly.

Thanks!
Anita
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
=LEFT(TEXT(A1,"mmm"))&TEXT(A1,"dyyyy")
 

Rick Rothstein

MrExcel MVP
Joined
Apr 18, 2011
Messages
37,628
Office Version
  1. 2019
  2. 2010
Platform
  1. Windows
Here is a solution that does not use concatenation (one less function call as well)...

=REPLACE(TEXT(A1,"mmmdyyyy"),2,2,"")
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,610
Messages
5,765,412
Members
425,285
Latest member
andypandypoo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top