Sum Rows Based on Column Month and Actual Month

fireman147

New Member
Joined
Jul 10, 2022
Messages
2
Office Version
  1. 365
  2. 2011
Platform
  1. Windows
Hello, I have a table and I'd like to sum each row based on the current completed actual month.
EX: It is currently July 10 and the July numbers aren't actually complete. I want the sum for each row to only be up to June even if July - December has a number in it. Then when August rolls around, the sum will include any numbers in the July column.
So: IF TEXT(MONTH(TODAY()-DAY(MONTH(TODAY()),"MMMM") will give me JUNE when its actually JULY, how do I limit the YTD to "6" reflecting only JAN-JUN, and so on for each successive month?


F&LS Stats.xlsx
BCDEFGHIJKLMNO
2Month
3JanFebMarAprMayJunJulAugSepOctNovDecYTD
4Fatalities11111111111112
5Inspections11111111111112
6Plans11111111111112
7Revenue11111111111112
8Public Education11111111111112
9Victim Assistance Runs11111111111112
10Run Car Responses11111111111112
11Contractors Portal11111111111112
12Portal All Clear Reports11111111111112
Data
Cell Formulas
RangeFormula
O4:O12O4=SUM(C4:N4)
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUM(C4:INDEX(C4:N4,MONTH(TODAY())-1))
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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