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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
In your example date 09/10/1995, if 10 is the month...
"S"mmyyyy

Or if 10 is the day...
"S"ddyyyy
 
Upvote 0
Here is a formula that will get you what you want:

=LEFT(TEXT(A8,"MMM"),1)&TEXT(A8,"DD")&TEXT(A8,"YYYY")
 
Upvote 0
Here's another formula:

=LEFT(TEXT(A1,"mmm"))&TEXT(A1,"ddyyyy")
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
Here is a solution that does not use concatenation (one less function call as well)...

=REPLACE(TEXT(A1,"mmmdyyyy"),2,2,"")
 
Upvote 0

Forum statistics

Threads
1,213,520
Messages
6,114,099
Members
448,548
Latest member
harryls

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
Back
Top