arindampaul
New Member
- Joined
- Nov 29, 2013
- Messages
- 1
Hi,
I was trying to sort out and make a consolidated table from a big data file of size around 18 MB. In this data file, I have to take out the dates from one sheet and paste on other sheet. So, I created one array named Dates() and dimmed it as Date. (For your information, I have to do this in such a way where each element of this array is being recognised as date, otherwise it was being changed to USA format and giving wrong result.) I made it a single element array to use less memory. Now I am using the following code:
For i = 1 To m
Dates(1) = Mid(Worksheets(1).Cells(7 + 3 * i + 15 * (k - 1), 1), 2, 8)
Worksheets(2).Cells(i + 4, 2) = Dates(1)
If 3 * i = 45 * k Then
k = k + 1
End If
Next i
In my code, m = 200,000. At i = 1086, it is showing as 'data mismatch'. But when I checked the cell it was currently working on viz. cell with row number 4330, it was showing a date only. But it did not recognise.
Can anyone please help me out to resolve the problem?
I was trying to sort out and make a consolidated table from a big data file of size around 18 MB. In this data file, I have to take out the dates from one sheet and paste on other sheet. So, I created one array named Dates() and dimmed it as Date. (For your information, I have to do this in such a way where each element of this array is being recognised as date, otherwise it was being changed to USA format and giving wrong result.) I made it a single element array to use less memory. Now I am using the following code:
For i = 1 To m
Dates(1) = Mid(Worksheets(1).Cells(7 + 3 * i + 15 * (k - 1), 1), 2, 8)
Worksheets(2).Cells(i + 4, 2) = Dates(1)
If 3 * i = 45 * k Then
k = k + 1
End If
Next i
In my code, m = 200,000. At i = 1086, it is showing as 'data mismatch'. But when I checked the cell it was currently working on viz. cell with row number 4330, it was showing a date only. But it did not recognise.
Can anyone please help me out to resolve the problem?