Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How do I say the following
=IF(B8=Thursday,2,0) i.e. Return the value 2 if B8 returns "Thursday" Where B8 is a date but it is formatted to show the day Thanks |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way:
=IF(WEEKDAY(B8)=5,2,0) HTH, Paul -- "Sean" wrote in message ups.com... How do I say the following =IF(B8=Thursday,2,0) i.e. Return the value 2 if B8 returns "Thursday" Where B8 is a date but it is formatted to show the day Thanks |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Sean" wrote...
How do I say the following =IF(B8=Thursday,2,0) i.e. Return the value 2 if B8 returns "Thursday" Where B8 is a date but it is formatted to show the day =IF(TEXT(B8,"ddd")="Thu",2,0) or =IF(WEEKDAY(B9,2)=4,2,0) |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
How do I say the following
=IF(B8=Thursday,2,0) i.e. Return the value 2 if B8 returns "Thursday" Where B8 is a date but it is formatted to show the day =IF(TEXT(B8,"ddd")="Thu",2,0) or =IF(WEEKDAY(B9,2)=4,2,0) I'm surprised you didn't offer these alternatives... =2*(TEXT(B9,"ddd")="Thu") =2*(WEEKDAY(B9,2)=4) <g Why, by the way, did you opt to use the 2nd argument in the WEEKDAY function call instead of the simpler single-argument form of this function? Rick |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Rick Rothstein \(MVP - VB\)" wrote...
.... Why, by the way, did you opt to use the 2nd argument in the WEEKDAY function call instead of the simpler single-argument form of this function? Because the OP has a UK e-mail address, and I'm not sure anyone outside the US thinks of Sunday as the 1st day of the week. That is, I was guessing the OP would find it more obvious to think of Thursday as the 4th day of the week. |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Because the OP has a UK e-mail address, and I'm not sure anyone
outside the US thinks of Sunday as the 1st day of the week. That is, I was guessing the OP would find it more obvious to think of Thursday as the 4th day of the week. Don't know if that is true for UK, in Sweden the week starts with Monday, another thing is that it is easier for instance to use as a criteria e.g. =WEEKDAY(A1,2)<6 is simpler than =AND(WEEKDAY(A1)1,WEEKDAY(A1)<7) -- Regards, Peo Sjoblom |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Why, by the way, did you opt to use the 2nd argument in the WEEKDAY
function call instead of the simpler single-argument form of this function? Because the OP has a UK e-mail address, and I'm not sure anyone outside the US thinks of Sunday as the 1st day of the week. That is, I was guessing the OP would find it more obvious to think of Thursday as the 4th day of the week. Ah! That is interesting. Not having an international background myself, it never occurred to me that other countries might start their calendar week with Monday instead of Sunday. That would probably be the explanation, then, between the Sunday/Monday start of week options on those date functions offering a start-of-week option... I just figured the option was there for company workweek usage only, not for general calendar use. You learn something new every day. Thanks Harlan. Rick |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try: =IF(TEXT(B8,"dddd")="Thursday",2,0)
-- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Sean" wrote: How do I say the following =IF(B8=Thursday,2,0) i.e. Return the value 2 if B8 returns "Thursday" Where B8 is a date but it is formatted to show the day Thanks |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
=(WEEKDAY(A1)=5)*2
"Sean" wrote: How do I say the following =IF(B8=Thursday,2,0) i.e. Return the value 2 if B8 returns "Thursday" Where B8 is a date but it is formatted to show the day Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|