Hello,
I have a reporting tool where all data sets produce dates as general. I need to manually change these for pivot etc.
I am looking for a cure all macro to run as reports may have more than one date column and it will be in a different position on each report.
I want to find all "dates" and reformat them so I can use them for grouping in pivots.
I think my issue is in the destination range section however any input or alternate methods would be gratefully received.
My current VBA -
Sub FormatDate()
For Each c In ActiveCell.CurrentRegion.Cells
If IsDate(c.Value) Then Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4), TrailingMinusNumbers:=True
Next
End Sub
Thanks
Bookmarks