Can't quite figure out how to get roud this issue, so I was wondering
if the masses could give me some pointers....
I have a named range that can contain a variable number of rows, each
each row contains a date, however, some of the cells have the date as
text (aligned to the left of the cell) and some are dates propper
(aligned to the right of the cell). I have no control over how the
file is formatted prior to its arrival, so have to find a way of
dealing with the inconsistency. Is there an easy way using VBA to
convert all the cells in the named range to dates propper?
I was hoping that something along the lines of
Application.WorksheetFunction.DateValue would work, but it doesn't
look as if that function is available. The best guess of
Range("DATEFIELD").value = CDate(Range("DATEFIELD").value) also
doesn't work, presumably because ends up as a circular reference.
Ideally, I'd prefer not to have to create additional columns in the
worksheet, but just perform some operation on then named range as a
whole. Any ideas?