Hi,
I have data files that come in with dates formatted in a variety of ways. Some columns have dates in a YYYY-MM-DD format, and those can be converted into a number with a YYYYMMDD format just by replacing the dashes in the cells with nothing. However, other columns can sometimes come in with dates in a M/D/YYYY format, and these need to be modified to also be in a YYYYMMDD format. How can I write VBA code to evaluate whether the date is in a M/D/YYYY format or not, and if so, how to convert it to YYYYMMDD format?
BTW, I can't just apply a YYYYMMDD format to all cells because that formats the cells that are now numbers as all #######s.
Any help that can be suggested will be greatly appreciated!
Bryan
Bookmarks