Click here to Skip to main content
15,881,898 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi

how do I format my cells in an excel table to a date format in my excel sheet?

please help....
Posted

Have a look here: Format a date the way you want[^]
 
Share this answer
 
thanks for the responses....here is the answer.....

Sub Macro()
On Error Resume Next

Sheets("Sheet1").Select

Sheet1.Range("B:B").Select
Sheet1.Range("B:B").NumberFormat = "m/d/yyyy"
End Sub
 
Share this answer
 
yep have tried this but the problem when I select the date format I want the sample don't show and my cell is not formatted.
 
Share this answer
 
Comments
Richard MacCutchan 9-Apr-14 9:16am    
Then you must be doing it wrong. Select the cell and then either right click and select Format Cells, or choose Format from the menu. It works in all versions of Excel.
Maciej Los 9-Apr-14 9:21am    
This is not an answer. Please, delete it to avoid down-voting.
If you want to post comment, please, use "Have a question or comment" widget.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900