![]() |
|
#10
|
|||
|
|||
|
check this link for instructions on how to set up your first macro...
http://office.microsoft.com/en-us/ex...138.aspx?CTT=1 repeat the operations in video, after you stop the macro, press visual basic button as picture attached, and replace your newly created macro with this macro: (your visual basic window should look like in picture attached...) Next step is to press the little green triangle highlighted in red in picture attached, it will do your job in less than 30 seconds. But attention, if you have wrong data in AD column, as i posted before, ( remember: "AD1, there is a text: "Nov-09" !! this is just a piece of text to excel, cannot recognize it as a date...There is no way excel can recognize it as 11/3/2009" )...you have to reenter data in those cells. Good luck ! ![]() Sub RecalculateCells() Dim i As Integer Application.ScreenUpdating = False For i = 1 To 1000 'if you need more than 1000 rows, change here ActiveSheet.Cells(i, 4).Select '4 means column D Selection.NumberFormat = "mm/dd/yyyy" 'choose format for D column ActiveCell.Value = ActiveCell.Value ' recalculate cells selected Next i For i = 1 To 1000 'if you need more than 1000 rows, change here ActiveSheet.Cells(i, 30).Select '30 means column AD Selection.NumberFormat = "mm/dd/yyyy" 'choose format for D column ActiveCell.Value = ActiveCell.Value ' recalculate cells selected Next i ActiveSheet.Cells(1, 4).Activate Application.ScreenUpdating = True End Sub |
| Tags |
| formatting |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Date formatting
|
kjxavier | Excel | 6 | 08-12-2011 05:46 AM |
Date Formatting in MS word 2007
|
Karthick | Word | 4 | 01-19-2010 05:54 AM |
Inserting Date, formatting to superscript and subscript
|
louq | Word | 1 | 10-22-2009 09:29 AM |
| new appointment date always reverts back to today's date | msills | Outlook | 0 | 08-24-2007 08:57 AM |
Imported message date change to today's date
|
promark | Outlook | 1 | 12-23-2005 07:21 AM |