ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return day name from a date (https://www.excelbanter.com/excel-programming/321096-return-day-name-date.html)

quartz[_2_]

Return day name from a date
 
I know you can use WEEKDAY to return the NUMBER of the day. But how can I use
a formula on a spreadsheet (or a macro in VBA) to return the name of the day
spelled out? For example:

01-18-2005 should return "Thursday"

Thanks in advance.

psp

Return day name from a date
 
Use the TEXT function:

=TEXT(date,"dddd")
where date is the date specifiedin standard date format like 1/18/2005.

good luck,

prashant
(not from Microsoft)

"quartz" wrote:

I know you can use WEEKDAY to return the NUMBER of the day. But how can I use
a formula on a spreadsheet (or a macro in VBA) to return the name of the day
spelled out? For example:

01-18-2005 should return "Thursday"

Thanks in advance.


Tom Ogilvy

Return day name from a date
 
Assume your date is in A1

=Test(A1,"dddd")

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
I know you can use WEEKDAY to return the NUMBER of the day. But how can I

use
a formula on a spreadsheet (or a macro in VBA) to return the name of the

day
spelled out? For example:

01-18-2005 should return "Thursday"

Thanks in advance.




quartz[_2_]

Return day name from a date
 
Thanks!

"psp" wrote:

Use the TEXT function:

=TEXT(date,"dddd")
where date is the date specifiedin standard date format like 1/18/2005.

good luck,

prashant
(not from Microsoft)

"quartz" wrote:

I know you can use WEEKDAY to return the NUMBER of the day. But how can I use
a formula on a spreadsheet (or a macro in VBA) to return the name of the day
spelled out? For example:

01-18-2005 should return "Thursday"

Thanks in advance.


Tom Ogilvy

Return day name from a date
 
Whoops, typo

=Test(A1,"dddd")
should be

=Text(A1,"dddd")

the cell could also be custom formatted using dddd
--
Regards,
Tom Ogilvy

"Tom Ogilvy" wrote in message
...
Assume your date is in A1

=Test(A1,"dddd")

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
I know you can use WEEKDAY to return the NUMBER of the day. But how can

I
use
a formula on a spreadsheet (or a macro in VBA) to return the name of the

day
spelled out? For example:

01-18-2005 should return "Thursday"

Thanks in advance.







All times are GMT +1. The time now is 03:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com