So, I'm trying to automate some dates in VBA. I get date, month and year separately and concatenate all three in one cell in VBA. But with this approach, I get date like "unformatted" and cannot filter them in months. Excel treats them like "text"

In attached screenshot, you can see bottom 4 cells which I actually refreshed by hitting F2 and enter. This updates them into date format and filter treats them as "date"

How can I automate this so that only in VBA, I can put them in this format?

The code is as follows

```
    'for each row run a formula to concatenate G+F+H for DD/MM/YYYY
    For Cnt = 2 To Cnt2

        If Cells(Cnt, 7).Value > 12 Then
            Cells(Cnt, 9).Value = Cells(Cnt, 7).Value & "." & Cells(Cnt, 6).Value & "." & Cells(Cnt, 8).Value
        Else
            Cells(Cnt, 9).Value = Cells(Cnt, 6).Value & "." & Cells(Cnt, 7).Value & "." & Cells(Cnt, 8).Value

        End If

    Next Cnt

    'delete F G H columns
    Columns("F:H").Select
    Selection.EntireColumn.Delete

    Columns("F:F").Select
    Selection.NumberFormat = "d/m/yy"

```

[![enter image description here](https://i.stack.imgur.com/G9R4g.png)](https://i.stack.imgur.com/G9R4g.png)