Formula: formula that bases total on current month throughout the year

Churchy LaFemme

Board Regular
Joined
Sep 22, 2010
Messages
135
Not sure how to phrase this - can I create a single-cell formula that knows what month it is and adjusts accordingly?

Over a two-year period, the project team needs to hold a total of 52 meetings (with guidance to have 2 meetings each month with an additional 4 whenever). My spreadsheet lists all the meetings by date.

Tallying up meetings held and meetings needed for each year is easy.

On the dashboard, I also want to have a sumif or countif that shows meetings needed in the current month.

A formula that recognizes what month we are in – is that even possible?

So, for 2018, there is one cell that shows needed meetings as of the current month.
In January, they need 6 (the two monthly meetings and the additional 4 meetings needed for the CY).
If they only have one meeting in January, then in February, they need 7. (The missing January meeting, both February meetings, and the 4 additional meetings needed over the course of the year.)
In April, if they had 2 meetings each month and also knocked out 3 of the additional meetings, they need 3 meetings that month.
In October, assuming they knocked out the 4 additional meetings and each of the 2 monthly meeting for Jan-Sept, then they need 2.

That is, in the third month, the total is 10, minus the number of meetings held. In the fourth month, the total is 12, minus the number of meetings held.

Is this possible? Can I tie month to (Today) in some way?

Or should I just give up and create a hidden sheet that calcs per month and then base the dashboard formula off of that? (Or try to do something in VBA which is often not allowed by our install.)

This example has the 52 meetings divided evenly between the two years.

20182019
Annual Compliance Check-up Meetings Held00
Annual Compliance Check-up Meetings to Schedule2626
Annual Compliance Check-up Meetings to Schedule this Month60

<tbody>
</tbody>

And thoughts on this bugger appreciated.
 

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.
the today() function returns the current date - format that as text mmm

so in A1 =text(today(),"mmm")

so it says jan

but I cannot understand what you want, yet...
 
Upvote 0
janfebmaraprmayjunerow 2
planned422242
held213241
short232223
col Dcol J
let us consider mar
clearly jan to mar 8 planned 6 held so we are 2 short
formula for 2 short in jan is
=SUM($E$3:E3)-SUM($E$4:E4)
dragged across
say current month is june and you want "short status" for mar
mar
2
formula giving this 2 is
=OFFSET($D$2,3,MATCH(E22,$E$2:$J$2,0))

<colgroup><col width="64" span="14" style="width:48pt"> </colgroup><tbody>
</tbody>
 
Upvote 0
I want a single cell that shows a total of events needed. In January, the calculation is X-[number of events logged]. In February, the calculation changes to (X+2)-[number of events logged.] In March, (x+4)-[number of events logged].

My guess is this is not possible. That I will have to created a hidden sheet that manages the month-by-month data and then use a formula that calculates a total based on the hidden-sheet data.

But then I wondered if any of the brilliant minds of Mr. Excel could sort this out!
 
Upvote 0
Hi,

Saw your post earlier today, but didn't have time to work on it then, I believe this does what you're describing:

B4 is your formula, Columns E and G are there just to show you the counts for different months (you DON'T need to add these to your worksheet).


Book1
ABCDEFG
1201820191/1/20185
2Annual Compliance Check-up Meetings Held102/1/20187
3Annual Compliance Check-up Meetings to Schedule26263/1/20189
4Annual Compliance Check-up Meetings to Schedule this Month504/1/201811
55/1/201813
66/1/201815
77/1/201817
88/1/201819
99/1/201821
1010/1/201823
1111/1/201825
1212/1/201827
Sheet18
Cell Formulas
RangeFormula
B4=MONTH(TODAY())*2+4-B2
G1=MONTH(E1)*2+4-B$2
 
Upvote 0
Wow. This is so much easier than I expected.

Thank you for the assist!

You're welcome, but we're not quite done yet, now that I know this is what you want, we need to improve the formula to deal with what to do when 2019 comes around:


Book1
ABCDEGHIK
1201820191/1/201851/1/201929
2Annual Compliance Check-up Meetings Held102/1/201872/1/201931
3Annual Compliance Check-up Meetings to Schedule26263/1/201893/1/201933
4Annual Compliance Check-up Meetings to Schedule this Month504/1/2018114/1/201935
55/1/2018135/1/201937
66/1/2018156/1/201939
77/1/2018177/1/201941
88/1/2018198/1/201943
99/1/2018219/1/201945
1010/1/20182310/1/201947
1111/1/20182511/1/201949
1212/1/20182712/1/201951
Sheet18
Cell Formulas
RangeFormula
B4=IF(YEAR(TODAY())>B1,B3-B2,IF(YEAR(TODAY())=B1,MONTH(TODAY())*2+4-B2,0))
C4=IF(YEAR(TODAY())>C1,C3-C2,IF(YEAR(TODAY())=C1,MONTH(TODAY())*2+B4-C2,0))
G1=MONTH(E1)*2+4-B$2
K1=MONTH(I1)*2+G$12-C$2


B4 and C4 formulae are slightly different.
When we get to 1/1/2019, B4 will No longer look at the current Month (which will give you incorrect result), it will show what the total required meetings less meetings already held, and for the 2019 column (C4), it will show 0 until 1/1/2019.
Then, starting 1/1/2019, instead of adding 4 to the 2 monthly meetings, it adds remaining required meetings from December of 2018.

Again, Columns E, G, I, K are there just to demonstrate the counts through out 2018 and 2019, you DON'T need to add these in your worksheet.
 
Upvote 0
In case anyone comes to this old thread for reference, I have a solution that is working very well for now. I may have to spend more time with jtakw's solution when 2019 rolls around.

This is based on the answers in the thread, and the poked a bit.

=A4-(SUMIF(CMD[Start Date],">="&DATE(YEAR(TODAY()),MONTH(TODAY()),1),CMD[Total]))

A4 is a cell in the document header that shows the number of meetings required per month.
CMD is a table showing meeting details.
Start Date is the start date of each meet-up, formatted as a date.
Total is formatted as a number. This column contains "1" if the full agenda was covered, or .5 or .75 if there is additional meeting time required to tick off all the compliance items.

This formula has shown the correct total needed each month, and correctly reset showing 6 as the monthly needed total.

Thanks again, Mr. Excel. ;)
 
Upvote 0
Solution
Hi, glad you have something that's working for you.
This is just FYI, the DATE part of your formula DATE(YEAR(TODAY()),MONTH(TODAY()),1) can also be done like this: EOMONTH(TODAY(),-1)+1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,652
Messages
6,120,746
Members
448,989
Latest member
mariah3

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