Formula help for rolling month to date

akvpv6

New Member
Joined
May 1, 2023
Messages
25
Office Version
  1. 365
Platform
  1. Windows
I am hoping someone can help me with my formula to show rolling month to date data in a table. The problem with my current formula is that in the months with no data it is just carrying over the total from the previous month as you can see in the image attached.

I want the cells from Jul - Mar to show as empty for Month to Date until data is entered in Quoted Provided. The formula I used is IF(H3<>"",SUM($H$3:H3),"")

It is also important to note I am looking to keep a rolling balance so July MTD would be July, June, May, and April data summed.

Thank you!
 

Attachments

  • MTD.PNG
    MTD.PNG
    29.8 KB · Views: 31

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
IF(H3<>"",SUM($H$3:H3),"")

so whats in K3 - as if blank then the formula should work - as it will be
IF(K3<>"",SUM($H$3:K3),"")
and so as K3 is blank, then this formula should return blank

maybe a hidden character in the cell ??? K3

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
IF(H3<>"",SUM($H$3:H3),"")

so whats in K3 - as if blank then the formula should work - as it will be
IF(K3<>"",SUM($H$3:K3),"")
and so as K3 is blank, then this formula should return blank

maybe a hidden character in the cell ??? K3

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
IF(H3<>"",SUM($H$3:H3),"")

so whats in K3 - as if blank then the formula should work - as it will be
IF(K3<>"",SUM($H$3:K3),"")
and so as K3 is blank, then this formula should return blank

maybe a hidden character in the cell ??? K3

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
Thank you for the response, at the moment the best I can offer is an additional picture of my workbook. As you can see I have a table that monthly data is manually entered. In the table to the right, I have a formula =IFERROR(SUMIF($A:$A,H2,$C:$C),"") that pulls the monthly data, for months with no quotes provided yet the formula is pulling in a "0" which I hid for aesthetics. I believe because the formula is bringing in a "0" the MTD formula =IF(H3<>"",SUM($H$3:H3),"") is taking that as a sign to roll the data over from the previous balance.


I filled out a few more rows of data for this response. For example, since I have no quotes for December (O3) I want there to be no numbers in (O7).
 

Attachments

  • MTD2.PNG
    MTD2.PNG
    39.6 KB · Views: 21
  • MTD3.PNG
    MTD3.PNG
    39 KB · Views: 18
Upvote 0
I believe because the formula is bringing in a "0" the MTD formula =IF(H3<>"",SUM($H$3:H3),"") is taking that as a sign to roll the data over from the previous balance.
yes because its not blank
=IFERROR(SUMIF($A:$A,H2,$C:$C),"")

Not sure i follow that - as it wont be a blank - it will just sum based on whatever is in H2
and return a zero , if nothing to SUM, unlikely to be an error - as far as excel is concerned

whats the chances of returning a valid 0 and wanting to sum ?

IF(K3<>0,SUM($H$3:K3),"")
 
Upvote 0
yes because its not blank


Not sure i follow that - as it wont be a blank - it will just sum based on whatever is in H2
and return a zero , if nothing to SUM, unlikely to be an error - as far as excel is concerned

whats the chances of returning a valid 0 and wanting to sum ?

IF(K3<>0,SUM($H$3:K3),"")
IF(K3<>0,SUM($H$3:K3),"") worked!

I didn't even think that I should be using the 0 to my advantage in the formula and not trying to treat it as a blank

thank you!!
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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