Please can someone give me the syntax to return a value (0,1,2,3 etc) or "day
of the week" when evaluating a specific date.
Many Thanks
--
Callan
Please can someone give me the syntax to return a value (0,1,2,3 etc) or "day
of the week" when evaluating a specific date.
Many Thanks
--
Callan
Hello Callan,
The easiest way is create a custom cell format.
1) Select the Cells or Cell you want to display the day of the week
2) On the Main Toolbar click Format
3) Click Cells...
4) Select the Number Tab
5) Click on Custom in the Category list
6) In the Type box (on the right) clear the contents
7) Type in ddd if you want to return the short form of the day (Sun, Mon, etc.)
8) Type in dddd if you want the full name of the day
9) Click OK
You can then reuse this format at anytime, anywhere in your workbook.
Sincerely,
Leith Ross
use the WEEKDAY function.
"Callan" wrote:
> Please can someone give me the syntax to return a value (0,1,2,3 etc) or "day
> of the week" when evaluating a specific date.
> Many Thanks
> --
> Callan
Note that weekday returns 1-7 not 0-6.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Patrick Molloy" <[email protected]> wrote in message
news:[email protected]...
> use the WEEKDAY function.
>
> "Callan" wrote:
>
> > Please can someone give me the syntax to return a value (0,1,2,3 etc) or
"day
> > of the week" when evaluating a specific date.
> > Many Thanks
> > --
> > Callan
You can use the 2nd argument of the Weekday function
WEEKDAY(serial_number,return_type)
Return_type
1 or omitted Numbers 1 (Sunday) through 7 (Saturday)
2 Numbers 1 (Monday) through 7 (Sunday)
3 Numbers 0 (Monday) through 6 (Sunday)
Cheers
Andy
Bob Phillips wrote:
> Note that weekday returns 1-7 not 0-6.
>
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks