Create a macro to format a column
Solved/Closed
Related:
- Create a macro to format a column
- Excel date format dd.mm.yyyy - Guide
- Create skype account with gmail - Guide
- Create a yahoo email account for free - Guide
- Create snapchat account - Guide
- Create instagram account on pc - Guide
2 replies
Place this on a module on VBA Editor
Sub format()
Selection.NumberFormat = "mm-dd-yy"
End Sub
When you want to run the macro, select the column you want to format and then run the macro
Sub format()
Selection.NumberFormat = "mm-dd-yy"
End Sub
When you want to run the macro, select the column you want to format and then run the macro
rizvisa1
Posts
4479
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
767
Aug 5, 2010 at 12:49 PM
Aug 5, 2010 at 12:49 PM
If only thing that you want to do is covert the text of columns into date, then you can use the Text to column option available under Data
Aug 20, 2010 at 08:17 AM
Thank you so much. This is exactly what I'm looking for. I know I could do it menually by clicking the menu bar or do the "text to column" as suggested by rizvisa1. But when there are so many date columns to be formatted in a workbook, the manual task becomes very tedeous. You are a life saver. Thank you again!