Custom Formatting a Date in a Text Entry?

The doomed

Active Member
Joined
Feb 13, 2008
Messages
263
I have a date in H34, 21/03/2009.

In I34 I have the same date again, except formatted as MMMM YYYY so its showing "March 2009".

In G10, I want the cell to read: Number at end of March 2009, with the month and year being taken from the date range. To be honest, I can get the year okay using the Year() function but cant get the month as cant convert it back from a numeric.

Any ideas?
 
I have Serenity on DVD - just haven't copied it over to the computer yet (I watch all my films/DVDs on the daily commute on the train).

The episode was the one where the captain got a coffin thru the mail containing what seemed to be a dead colleague (who was being chased by Feds on a private mission).
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Slightly related to my original post, I'm looking to work out how to get the previous calendar month to display as "February 2009".

B3 contains the date value (24/03/09)

D2 calculates for me the previous month as a numercic:
=IF(MONTH(B3)=1,"12",MONTH(B3)-1)
...which is currently '2' for February.

And O2 calculates the year of the previous month:
=IF(D2="12",YEAR(B3)-1,YEAR(B3))
...which is currently '2009'.

J1 combines D2 and O2 to show me the previous month
=D2&" "&O2
...which is currently showing '2 2009'

Can anyone help me make this show as February 2009?
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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