Due to a bug in Crystal Reports, date fields export into Excel with a leading space in the cell.
As on this occasion VBA is not any option, I attempted to remove the leading space with a formula that uses substitute, as follows:
A1 = leading space + date (format yyyy-mm-dd)
B1 = substitute (A1,” “,””)
This removed the space, but displayed the field as a serial value, instead of the date in A1.
I then tried:
B1 = value(substitute(A1,” “,””))
This formatted the field as a date, but left the leading space in the field.
I would be very grateful for some help with this.
useful