Hi all, I need a bit of help with how to fix my date formats. I receive data weekly and I run VBA code that copies the data and paste values it into a master sheet.
I also have an xlookup function referencing that date column, however, the date is coming is as half in one format and the other half in another format... so the xlookup is only working for half of the dates.
I currently use this line in my VBA code but it doesn't change anything -> Sheets("XXX").Range("P:P").NumberFormat = "m/d/yyyy"
Please see the attached picture of the filtered column of dates to understand my issue... I would like the date to be in the format of the others that are MM/DD/YYYY when I run the VBA code so I don't have to manually fix.
Any idea why this is happening and how to format them the same with VBA if possible?
Thank you for your help!
I also have an xlookup function referencing that date column, however, the date is coming is as half in one format and the other half in another format... so the xlookup is only working for half of the dates.
I currently use this line in my VBA code but it doesn't change anything -> Sheets("XXX").Range("P:P").NumberFormat = "m/d/yyyy"
Please see the attached picture of the filtered column of dates to understand my issue... I would like the date to be in the format of the others that are MM/DD/YYYY when I run the VBA code so I don't have to manually fix.
Any idea why this is happening and how to format them the same with VBA if possible?
Thank you for your help!