Change the date format in the cell

Zain_inout

New Member
Joined
Sep 8, 2021
Messages
18
Office Version
  1. 2019
Platform
  1. Windows
Hi, I would like to change the format from "December 27, 2020 to October 2, 2021" to "27 December, 2020 to 2 October , 2021"??
Please note that the month, date and year can be different in different reports.

Please help me with a code to do this
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Is the value a string or date type?
If date then:
Right click on the cell => Format Cell => Custom =>[$-en-US]d mmmm , yyyy;@
 
Upvote 0
Upvote 0
Is the value a string or date type?
If date then:
Right click on the cell => Format Cell => Custom =>[$-en-US]d mmmm , yyyy;@
Hi, thanks for the reply. I am actually looking for a vba code to do the same. The value is a string
 
Upvote 0
Cell Formulas
RangeFormula
B3B3=TEXT(C1,"mmmm dd, yyy")&" to "&TEXT(D1,"mmmm d, yyy")
B4B4=TEXT(C1,"dd mmmm, yyy")&" to "&TEXT(D1,"d mmmm, yyy")
B6B6=TEXT(DATE(2020,12,27),"dd mmmm, yyy")&" to "&TEXT(DATE(202,10,2),"d mmmm, yyy")
Hi, thanks a lot for this. I am actually looking to write to vba code that can automate this
 
Upvote 0

Forum statistics

Threads
1,215,675
Messages
6,126,153
Members
449,294
Latest member
Jitesh_Sharma

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