View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dd dd is offline
external usenet poster
 
Posts: 95
Default How do I count the number of even weeks in the current month.

Thanks mike

I originally used
=INT((A1-SUM(MOD(DATE(YEAR(A1-MOD(A1-2,7)+3),1,2),{1E+99,7})*{1,-1})+5)/7)
But =TRUNC(((B6-DATE(YEAR(B6),1,0))+6)/7) seems quicker.

I got the start and end dates using
=DATE(YEAR(NOW()),MONTH(NOW()),1)
and
=DATE(YEAR(NOW()),MONTH(NOW())+1,1)-1

I get the number of even weeks using
=ROUND((End Week No-Start Week No)/2,0)

I need a statement which will multiply (consecutuvely) the value, so that,
when the even-weeks occur the value increases.

So that when the first even-week comes around the cell value changes to £100
When the second even week occurs the value changes to £200
And if there is a third even week, the value changes to £300

Regards
Dylan

"Mike" wrote in message
...
This is going to be very difficult to solve. For example it is quite
possible
for the first few days of January to be week 52 or even (surprisingly) week
53 of the previous year. When the latter happens ther will be 2 consecutive
odd weeks (53 - 1) which will not help your cashflow. You may be able to
build on theis

=TRUNC(((B6-DATE(YEAR(B6),1,0))+6)/7)

which will return the week number.

Mike

"dd" wrote:

I receieve payments every two weeks.

I have a budget spreadsheet and I want to set up a function which tells me
the number of even-numbered weeks in the current month. I can then
multiply
this figure, by the amount of each payment and include it in my budget
calculations.

Also, I want to know how to identify the start and end-of-month
weeknumbers,
for each month. I can then use arguments to update the budget when the
payments are actually received?

Regards
DDawson
Scotland