How to calcuate YTD Sum with Quarterly/Half Inserts

FinBusPtnr

New Member
Joined
May 7, 2019
Messages
1
Hi there -

I am working on a file where expenses are listed by month. However,within that range, there are quarterly and half sums. So the range looks like:

J, F, M, Q1, A, M, J, Q2, H1, J,A, S, Q3, O, N, D, Q4, H2, FY

Looking for a way to calculate year to date expenses, excluding the quarterly and half sums. So how would I calculate April YTD spend, excluding the Q1 sum?

I would prefer a formula, but not completely opposed to VBA.

Thanks in advance!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Welcome to the forum.

There are many formulas to use here. These rely on expanding ranges and work differently depending upon what kind of heading you have for the month. They eliminate the Qs, the Hs and the FY from the summations in each column.

Copy the three formulas in B7 through B9 across all columns.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]
Book1
ABCDEFGHIJKLMNOPQRST
2Month,1123Q1456Q2H1789Q3101112Q4H2FY
3Month,2JFMQ1AMJQ2H1JASQ3ONDQ4H2FY
4Month,3JanFebMarQ1AprMayJunQ2H1JulAugSepQ3OctNovDecQ4H2FY
5Expenditure927893263927893263526763552163974623166329855
6
7YTD per month, 192170263263355433526526526602637689689786832855855855855
8YTD per month, 292170263263355433526526526602637689689786832855855855855
9YTD per month, 392170263263355433526526526602637689689786832855855855855
Sheet33
Cell Formulas
RangeFormula
B7=SUM(IF(ISNUMBER($B$2:B2),$B$5:B5))
B8=SUM(IF(LEN($B$3:B3)<2,$B$5:B5))
B9=SUM(IF(LEN($B$4:B4)>2,$B$5:B5))
[/FONT]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,170
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