ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem with week number/day type formula (https://www.excelbanter.com/excel-discussion-misc-queries/182742-problem-week-number-day-type-formula.html)

Wendy

Problem with week number/day type formula
 
Hi

I have a formula to work out the week number and day per month..
C1 ="W"&CEILING(DAY(B1)/7,1)&TEXT(WEEKDAY(B1),"DDD") and B1=TODAY( )

It was working fine but today should be W2Mon and the formula gives W1Mon.

Thanks

Wendy





joel

Problem with week number/day type formula
 
The code is right. Check the data on you PC to make sure your have the right
date set. You should get 8/7 = 1.333 and the ceiling function should round
up to 2.

"Wendy" wrote:

Hi

I have a formula to work out the week number and day per month..
C1 ="W"&CEILING(DAY(B1)/7,1)&TEXT(WEEKDAY(B1),"DDD") and B1=TODAY( )

It was working fine but today should be W2Mon and the formula gives W1Mon.

Thanks

Wendy






Ron Rosenfeld

Problem with week number/day type formula
 
On Mon, 7 Apr 2008 15:02:43 +0100, "Wendy" wrote:

Hi

I have a formula to work out the week number and day per month..
C1 ="W"&CEILING(DAY(B1)/7,1)&TEXT(WEEKDAY(B1),"DDD") and B1=TODAY( )

It was working fine but today should be W2Mon and the formula gives W1Mon.

Thanks

Wendy




The problem may be that you were not clear in your specifications. For
example, you wrote:

" 2nd Monday is always W2Mon "

Since today is the First Monday of April, then either you will have two W2Mon's
or you need to rethink your specifications.
--ron

Ron Rosenfeld

Problem with week number/day type formula
 
On Mon, 7 Apr 2008 07:28:03 -0700, Joel wrote:

The code is right. Check the data on you PC to make sure your have the right
date set. You should get 8/7 = 1.333 and the ceiling function should round
up to 2.


From where are you getting the "8"?

--ron

Wendy

Problem with week number/day type formula
 
Hi Joel

When I do 8/7 my answer is 1.142857. Windows XP, Office 2003 sp2. It is
working ok today!

Wendy




"Joel" wrote in message
...
The code is right. Check the data on you PC to make sure your have the
right
date set. You should get 8/7 = 1.333 and the ceiling function should
round
up to 2.

"Wendy" wrote:

Hi

I have a formula to work out the week number and day per month..
C1 ="W"&CEILING(DAY(B1)/7,1)&TEXT(WEEKDAY(B1),"DDD") and B1=TODAY( )

It was working fine but today should be W2Mon and the formula gives
W1Mon.

Thanks

Wendy








Wendy

Problem with week number/day type formula
 
Hi Ron

It doesn't matter it is the 1st monday in april it is still the start of
week2.
Can you suggest a way round this to make it work?

Thanks

Wendy

"Ron Rosenfeld" wrote in message
...
On Mon, 7 Apr 2008 15:02:43 +0100, "Wendy" wrote:

Hi

I have a formula to work out the week number and day per month..
C1 ="W"&CEILING(DAY(B1)/7,1)&TEXT(WEEKDAY(B1),"DDD") and B1=TODAY( )

It was working fine but today should be W2Mon and the formula gives W1Mon.

Thanks

Wendy




The problem may be that you were not clear in your specifications. For
example, you wrote:

" 2nd Monday is always W2Mon "

Since today is the First Monday of April, then either you will have two
W2Mon's
or you need to rethink your specifications.
--ron




Ron Rosenfeld

Problem with week number/day type formula
 
On Tue, 8 Apr 2008 11:32:14 +0100, "Wendy" wrote:

Hi Ron

It doesn't matter it is the 1st monday in april it is still the start of
week2.
Can you suggest a way round this to make it work?



With the specifications you have supplied, only by making both yesterday and
next Monday = W2Mon.

You have written:

" 2nd Monday is always W2Mon "

and also:

"It doesn't matter it is the 1st monday in april it is still the start of
week2."

The only way I see to resolve these two statements is to make both yesterday
and next Monday to be W2Mon.

If that is not what you want, then you will have to lay out unambiguous
specifications.
--ron


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

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