Number of days left in a month

CodyMonster

Board Regular
Joined
Sep 28, 2009
Messages
159
I have a problem, hopefully someone can answer. This board has never let me down in the past.

I'm trying to calculate the amount of volume of a product in a month, however, the volume might be delivered over two months.
Example:

  • I have 1000 gallons being delivered from Jan 28th to Feb 4th
  • Not taking into account weekends or holidays, I have 3 days in Jan and 3 days in Feb
  • this would equal 166.66 gals per day.
  • this means I would have 500 gal in Jan and 500 in Feb
  • the gallons and dates change and are not static

I already have the working days and the holiday calendar working per
https://msdn.microsoft.com/en-us/library/dd327646(v=office.12).aspx

Anyone have any ideas?
I was thinking of trying to work out what the last day of the month is, and use the above function with the end date as the last day of the month for Jan. And the Beg of the month for the Feb. But I need to find a way to get Feb 1, 2015 if I have the month of Feb. And I need to find a way to get Jan 31, 2015 if I have the month of Jan.

Any help would be great..
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
=EOMONTH(A1,0) will look at the date in A1 and give the end of that month
=EOMONTH(A1,1) will look at the date in A1 and give the end of the next month

=EOMONTH(A1,0)+1 will give the start of the next month
 
Upvote 0
Is there an EOMONTH function in Access.. ?

=EOMONTH(A1,0) will look at the date in A1 and give the end of that month
=EOMONTH(A1,1) will look at the date in A1 and give the end of the next month

=EOMONTH(A1,0)+1 will give the start of the next month
 
Upvote 0

Forum statistics

Threads
1,221,899
Messages
6,162,686
Members
451,782
Latest member
LizN

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