I use the following code to populate a date field on a sheet right now
raceDate is a string...so for example if its value was "20141101" the output I'd get would be Saturday, November 1, 2014
This is great, except on Wednesdays
On Wednesdays, the string becomes so long that it runs into some other elements on the sheet.
I can think of a couple of approaches
-- storing the string, splitting it on commas, select casing the first element and replacing Monday with Mon, Tuesday with Tues, Wednesday with Wed (the real offender), etc
-- counting characters and reducing the font size when the count gets too high
But I was wondering if the collective genius of this forum had a better answer?
Code:
ws.Range("E7").Value = Format(DateSerial(CInt(Left(raceDate, 4)), CInt(Mid(raceDate, 5, 2)), CInt(Right(raceDate, 2))), "Long Date")
raceDate is a string...so for example if its value was "20141101" the output I'd get would be Saturday, November 1, 2014
This is great, except on Wednesdays
On Wednesdays, the string becomes so long that it runs into some other elements on the sheet.
I can think of a couple of approaches
-- storing the string, splitting it on commas, select casing the first element and replacing Monday with Mon, Tuesday with Tues, Wednesday with Wed (the real offender), etc
-- counting characters and reducing the font size when the count gets too high
But I was wondering if the collective genius of this forum had a better answer?