Hello Akuini,
Thanks for responding. Below is a sample of the data
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]7851203[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="class: xl65, width: 148, align: right"]12/4/2019 23:14[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]7851569[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="class: xl65, width: 148, align: right"]12/4/2019 23:22[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]1243752[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved by Financial Institution[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="width: 148"]13/04/2019 0:10[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]7852253[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved by Financial Institution[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="width: 148"]13/04/2019 0:30[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]1657054[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="class: xl65, width: 148, align: right"]12/5/2019 23:38[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]7947320[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Kindly enter the OTP sent to 234813***8577[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="class: xl65, width: 148, align: right"]12/5/2019 23:40[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]5347509[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="width: 148"]13/05/2019 0:12[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]5268985[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="width: 148"]13/05/2019 0:49[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]1066630[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]The bank is currently unable to process this transaction. Please try another card or bank account.[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="class: xl65, width: 148, align: right"]12/6/2019 23:21[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]8851513[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 270"]
<tbody>[TR]
[TD="width: 270"]Approved by Financial Institution[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 148"]
<tbody>[TR]
[TD="width: 148"]13/06/2019 0:33[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
The data is specifically for month 4,5,6 (ie April,May,June) so therefore I know that even if the first 2 numbers are less than 13, it doesn't mean that the date as in the first row is not December but April.
When I ran the code, I got the error below highlighted in Yellow
If Left(x, 2) < 13 Then va(i, 1) = DateSerial(Right(x, 4), Left(x, 2), Mid(x, 4, 2))
Hi, AfuaImade
The OP's data problem is like this:
If the first 2 numbers are less than 13 then it means the date is wrong (meaning the days & months have been swapped).
Could you explain your data problem?
Could you explain 'doesn't seem to be working'? Did the code produce a wrong result?
And could you post some data as table?