Calculate the number of mondays in a dynamic time frame

Cyankee

New Member
Joined
Nov 20, 2011
Messages
28
Ok, so the title might be confusing.

I play the lottery a little bit. What I am trying to calculate is the end date based upon the number of drawings I purchase.

Taking the two everyone is most familiar with Powerball and Mega Millions

If I purchase tickets today(2/8/15) for four draws on each game. I can look at a calendar and figure out the last play date, but, I would like to calculate it in Excel.

I have worked out the start date, it is a rather large formula, but I got it.
How do I get the last date?
Powerball draws on Wednesday and Saturday which makes the last date to be 2/21/15
Mega Millions is on Tuesday and Friday which makes the last date to be 2/20/15

If I purchase on the same day all the time, it would not really be a problem, but I do not and I also will not purchase the same amount of drawings each time.

Thanks
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Which version of Excel are you using? If you have Excel 2010 or later you can customise WORKDAY.INTL to give an end date for any combination of days, e.g. for Wednesday and Saturday

=WORKDAY.INTL(A2,4,"1101101")

Where A2 contains the purchase date and where the "1101101" represents the 7 days of the week (starting with Monday) and the zeroes are the days to be counted.

So Tuesday and Friday would be "1011011"

If you want to include the purchase date in the count then use A2-1 as the first parameter
 
Upvote 0
Great! Works perfectly!

I thought it would also work for the first day of the drawing and it does. Just changed the 4 to a 1.

Thanks barry!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,694
Messages
6,126,250
Members
449,305
Latest member
Dalyb2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top