TkdKidSnake
Board Regular
- Joined
- Nov 27, 2012
- Messages
- 245
- Office Version
- 365
- Platform
- Windows
Hi,
I have come up with the code below to enter a range of cells and then force the cell to be entered and refreshed, the reason I need to do this is the data is actually dates and some aren't being picked up as such, I was wondering if anyone knows a quicker way of doing this because fundamentally there are 4 columns that this is required and each column can have more than 2,500 cells.
What I have is below:
Thanks all.
I have come up with the code below to enter a range of cells and then force the cell to be entered and refreshed, the reason I need to do this is the data is actually dates and some aren't being picked up as such, I was wondering if anyone knows a quicker way of doing this because fundamentally there are 4 columns that this is required and each column can have more than 2,500 cells.
What I have is below:
Code:
Sub EnterF2()'
Application.ScreenUpdating = False
'
Dim r As Range
Dim n As Integer
Dim AssDateLastRow As Long
AssDateLastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
Set r = Range("P2:S" & AssDateLastRow)
r.Select
r.NumberFormat = "yyyy-mm-dd;@"
r.Select
For n = 1 To r.Rows.Count
SendKeys "{F2}", True
SendKeys "{ENTER}", True
Next n
'
Application.ScreenUpdating = False
End Sub
Thanks all.