LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 100
Default Enter WEDNESDAY, not Wednesday

Excel Experts,

My code enters in A2 the date and day of the week for the last trade date
(business date) in the format:
10/19/05 Wednesday

However, I'd like the day of the week to be all Caps, so that the code enters:
10/19/05 WEDNESDAY

How would I change the code below to enter the day of the week in all caps.

Thanks in advance, Alan


Sub NewDate()
Dim sDate As String
Dim sDay As String

'Updates date field with last trading day

sDate = Evaluate("=TODAY()-IF(WEEKDAY(TODAY())=2,3,1)")
sDate = Format(sDate, "mm/dd/yy")

sDay = Evaluate("=TODAY()-IF(WEEKDAY(TODAY())=2,3,1)")
sDay = Format(sDate, "dddd")

Range("A2").Select
Selection.Formula = sDate & " " & sDay

End Sub


--
achidsey
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Return the first Wednesday of each month dalymjl Excel Worksheet Functions 5 April 4th 23 02:28 PM
How to set formula for poping up the date of next Wednesday.... J Excel Worksheet Functions 2 June 30th 09 09:26 AM
Excel Bi-weekly time sheet change dates to Thursday- Wednesday? cainart New Users to Excel 13 July 25th 07 12:50 PM
Save Excel File every wednesday VB Script Help !! sam76210 Excel Discussion (Misc queries) 0 March 8th 06 04:05 PM
Determine every wednesday based off year Millerk Excel Discussion (Misc queries) 2 March 2nd 06 06:23 PM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"