Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
hi, In one of my cells i want to display the weekday corresponding to a specific date. For example i want to display "Monday" if the date i am referring (from another cell) as being the 05/09/2005 (5th Sept 2005). How do I achieve this? Cheers Sahil -- schoujar ------------------------------------------------------------------------ schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574 View this thread: http://www.excelforum.com/showthread...hreadid=400688 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
If you're looking for a formula, then maybe you can use this: =CHOOSE(WEEKDAY(A1),"Sunday","Monday","Tuesday","W ednesday","Thursday","Friday","Saturday") [A1 is the cell containing the date] But, if you're looking for VBA code, then you can use the WeekDay an WeekDayName functions: Target.Offset(0, 1).Value = *WeekdayName*(*Weekday*(Target)) :) schoujar Wrote: hi, In one of my cells i want to display the weekday corresponding to specific date. For example i want to display "Monday" if the date i am referring (fro another cell) as being the 05/09/2005 (5th Sept 2005). How do I achieve this? Cheers Sahi -- T-Že ----------------------------------------------------------------------- T-Žex's Profile: http://www.excelforum.com/member.php...fo&userid=2657 View this thread: http://www.excelforum.com/showthread.php?threadid=40068 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
Link the cell to the one containing the date and then format as Custom dddd.
Regards Rowan "schoujar" wrote: hi, In one of my cells i want to display the weekday corresponding to a specific date. For example i want to display "Monday" if the date i am referring (from another cell) as being the 05/09/2005 (5th Sept 2005). How do I achieve this? Cheers Sahil -- schoujar ------------------------------------------------------------------------ schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574 View this thread: http://www.excelforum.com/showthread...hreadid=400688 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
schoujar Wrote: hi, In one of my cells i want to display the weekday corresponding to specific date. For example i want to display "Monday" if the date i am referring (fro another cell) as being the 05/09/2005 (5th Sept 2005). How do I achieve this? Cheers Sahil Hi Sahil Try =TEXT(WEEKDAY(A1),"dddd") - change A1 to suit your cell referenc -- Paul Sheppar ----------------------------------------------------------------------- Paul Sheppard's Profile: http://www.excelforum.com/member.php...fo&userid=2478 View this thread: http://www.excelforum.com/showthread.php?threadid=40068 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
Maybe you could just apply a different format to the original cell:
mm/dd/yyyy*_dddd (use a space bar instead of the underscore) schoujar wrote: hi, In one of my cells i want to display the weekday corresponding to a specific date. For example i want to display "Monday" if the date i am referring (from another cell) as being the 05/09/2005 (5th Sept 2005). How do I achieve this? Cheers Sahil -- schoujar ------------------------------------------------------------------------ schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574 View this thread: http://www.excelforum.com/showthread...hreadid=400688 -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
Thanx guys that was extremely helpful. I finally went with Text(Weekday(A1), "dddd") Cheers Sahil :) -- schoujar ------------------------------------------------------------------------ schoujar's Profile: http://www.excelforum.com/member.php...o&userid=26574 View this thread: http://www.excelforum.com/showthread...hreadid=400688 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting weekday for a date
schoujar wrote:
Thanx guys that was extremely helpful. I finally went with Text(Weekday(A1), "dddd") =TEXT(A1, "dddd") is enough. Text(Weekday(A1), "dddd") makes the same result just in the 1900 date system that considers "1" (i.e. 1/1/1900) to be Sunday. (though 1/1/1900 is Monday actually.) -- HTH, okaizawa |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to compute date of next weekday? | Excel Discussion (Misc queries) | |||
calculating weekday date | New Users to Excel | |||
convert weekday date to the next sunday date | Excel Worksheet Functions | |||
WEEKDAY() function: display TEXT not numeric weekday | Excel Discussion (Misc queries) | |||
MATCHING DATE TO A WEEKDAY | Excel Worksheet Functions |