Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how to reccognize what day is it ?

Dim dt as Date
dt = DateValue("08-17-2006")

Now if you want to calculate with the day of the week

iday = weekday(dt) '

if you want to display Thursday

sday = Format(dt,"dddd") ' Thursday
or
sday = Format(dt,"ddd") ' Thu


demo'd from the immediate window:

dt = DateValue("08-17-2006")
? weekday(dt)
5
? format(dt,"dddd")
Thursday
? format(dt,"ddd")
Thu


--
Regards,
Tom Ogilvy


"vumian" wrote:


hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


Hi Vumian,

I think this is what you're after.

Sub chDate()

rDate = "8-23-2006"

MsgBox (Format(rDate, "dddd"))



End Sub



HTH
Joe


--
LFCFan
------------------------------------------------------------------------
LFCFan's Profile: http://www.excelforum.com/member.php...o&userid=37484
View this thread: http://www.excelforum.com/showthread...hreadid=572676

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to reccognize what day is it ?

MsgBox Format(myDate,"dddd")

where myDate is the date.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"vumian" wrote in
message ...

hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance


--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


oke thanks everyone

i have a liitle question mo)

i have a date range, from 1 to end of month, it is put per cell

how to check what cell is sunday, and fill anycolo it ?

use format formula ? how ?

thanks one more


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


you can try using conditional formating

Assuming that your data is in column A and that the cell actuall
contains the entire date:

Formula is =workday(a1)=7

and just Format Painter fill dow

--
Bearacad

-----------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...fo&userid=3501
View this thread: http://www.excelforum.com/showthread.php?threadid=57267

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how to reccognize what day is it ?

selection.Interior.ColorIndex = xlNone
for each cell in selection
if weekday(cell,vbSunday) = 1 then
cell.Interior.colorIndex = 4
end if
Next

--
Regards,
Tom Ogilvy

"vumian" wrote:


oke thanks everyone

i have a liitle question mo)

i have a date range, from 1 to end of month, it is put per cell

how to check what cell is sunday, and fill anycolo it ?

use format formula ? how ?

thanks one more


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how to reccognize what day is it ?

One more if you're using xl2002 (xl2k???) or higher.

MsgBox WeekdayName(Weekday(Date))

WeekDayName was added in one of those versions.

vumian wrote:

hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance

--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676


--

Dave Peterson
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to reccognize what day is it ?

You need to add Sunday start

WeekdayName(weekday(Date),,vbSunday)

Although help says vbSunday is the default,

WeekdayName(weekday(Date))

gives Friday for today (at least on my machine).

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dave Peterson" wrote in message
...
One more if you're using xl2002 (xl2k???) or higher.

MsgBox WeekdayName(Weekday(Date))

WeekDayName was added in one of those versions.

vumian wrote:

hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance

--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread:

http://www.excelforum.com/showthread...hreadid=572676

--

Dave Peterson



  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how to reccognize what day is it ?

Hmmm. Have you been playing with your pc date?

Option Explicit
Sub testme()
Debug.Print Date & "--" & WeekdayName(Weekday(Date))
End Sub

08/17/2006--Thursday

======
I don't have a guess why there would be a difference.



Bob Phillips wrote:

You need to add Sunday start

WeekdayName(weekday(Date),,vbSunday)

Although help says vbSunday is the default,

WeekdayName(weekday(Date))

gives Friday for today (at least on my machine).

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dave Peterson" wrote in message
...
One more if you're using xl2002 (xl2k???) or higher.

MsgBox WeekdayName(Weekday(Date))

WeekDayName was added in one of those versions.

vumian wrote:

hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance

--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread:

http://www.excelforum.com/showthread...hreadid=572676

--

Dave Peterson


--

Dave Peterson


  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to reccognize what day is it ?

Absolutely not, I get Thursday by adding vbSunday. I get correct date, wrong
day.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dave Peterson" wrote in message
...
Hmmm. Have you been playing with your pc date?

Option Explicit
Sub testme()
Debug.Print Date & "--" & WeekdayName(Weekday(Date))
End Sub

08/17/2006--Thursday

======
I don't have a guess why there would be a difference.



Bob Phillips wrote:

You need to add Sunday start

WeekdayName(weekday(Date),,vbSunday)

Although help says vbSunday is the default,

WeekdayName(weekday(Date))

gives Friday for today (at least on my machine).

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Dave Peterson" wrote in message
...
One more if you're using xl2002 (xl2k???) or higher.

MsgBox WeekdayName(Weekday(Date))

WeekDayName was added in one of those versions.

vumian wrote:

hi everyone,

if i have date 08-23-2006, how to check it what day is it

example: 08-17-2006, today is thursday

thanks in advance

--
vumian

------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread:

http://www.excelforum.com/showthread...hreadid=572676

--

Dave Peterson


--

Dave Peterson



  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


hi everyone,

hi, if i have a range from A1 to A31, which per date in per cell during
month

how to check from fisrt to end of month what is sunday (or other) and
fill color it ?

thanks in advance


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676

  #13   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to reccognize what day is it ?

What you want is conditional formatting.

Select A1:A31
Goto FormatConditional Formatting
Change Condition 1 to Formula Is
Add a formula of =WEEKDAY(A1)=1
Click the Format button
Select the Pattern Tab
Select an appropriate highlighting colour
OK
OK


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"vumian" wrote in
message ...

hi everyone,

hi, if i have a range from A1 to A31, which per date in per cell during
month

how to check from fisrt to end of month what is sunday (or other) and
fill color it ?

thanks in advance


--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676



  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


hi Bob Phillips,

thank you very much man


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676

  #15   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


hi

anyone can help me please

=text(WEEKDAY(A1)=1,"dddd")
=IF(WEEKDAY(C3)=1,format(C3,"dddd"))
=format(WEEKDAY(A1)=1,"dddd")


all of them wrong somthing ??

thanks in advanc

--
vumia
-----------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649
View this thread: http://www.excelforum.com/showthread.php?threadid=57267



  #16   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how to reccognize what day is it ?

If the date to be checked is in C3:

=WEEKDAY(C3)=1

=text(C3,"dddd")="Sunday"

=Test(C3,"ddd")="Sun"


"Sunday" is what I get in my US English Version. I can't say for you.


--
Regards,
Tom Ogilvy


"vumian" wrote in
message ...

hi

anyone can help me please

=text(WEEKDAY(A1)=1,"dddd")
=IF(WEEKDAY(C3)=1,format(C3,"dddd"))
=format(WEEKDAY(A1)=1,"dddd")


all of them wrong somthing ??

thanks in advance


--
vumian
------------------------------------------------------------------------
vumian's Profile:
http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676



  #17   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


hi,

i don't understand your mean
i just wanna format date to sunday text and fill color it, if it is
sunday

thank yo

--
vumia
-----------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...fo&userid=3649
View this thread: http://www.excelforum.com/showthread.php?threadid=57267

  #18   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to reccognize what day is it ?

Use the conditional formatting to colour it as I showed you in my previous
response, and set the format of the cell to "dddd" (without the quotes), via
FormatCellsCustom

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"vumian" wrote in
message ...

hi,

i don't understand your mean
i just wanna format date to sunday text and fill color it, if it is a
sunday

thank you


--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676



  #19   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how to reccognize what day is it ?


hi Bob Phillips,

i know your way already, i do not want use that
i wanna use 'conditional formating' as my wrong formula above

how to fix it please. thanks


--
vumian
------------------------------------------------------------------------
vumian's Profile: http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676

  #20   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default how to reccognize what day is it ?

As far as I can see, what I suggested will do exactly as you ask, and you
haven't told me differently, just that you don't want to use that. So if you
just reject what I offer then there is no point in me wasting my time.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"vumian" wrote in
message ...

hi Bob Phillips,

i know your way already, i do not want use that
i wanna use 'conditional formating' as my wrong formula above

how to fix it please. thanks


--
vumian
------------------------------------------------------------------------
vumian's Profile:

http://www.excelforum.com/member.php...o&userid=36494
View this thread: http://www.excelforum.com/showthread...hreadid=572676



Reply
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



All times are GMT +1. The time now is 05:18 AM.

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

About Us

"It's about Microsoft Excel"