YTD on multiple columns

bakerwe3

New Member
Joined
Mar 21, 2016
Messages
25
[TABLE="width: 2106"]
<colgroup><col span="24"><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]I need to some help to sum the coloums from month to calulcate the Year to date, the problem is I have two type of columnes I need to sum [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 2106"]
<colgroup><col span="24"><col><col><col><col></colgroup><tbody></tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Apr[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Apr[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]May[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]May[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Jun[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Jun[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Jul[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Jul[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Aug[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Aug[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Sep[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Sep[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Oct[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Oct[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Nov[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Nov[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Dec[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Dec[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Jan[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Jan[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Feb[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Feb[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Mar[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="colspan: 2"]Mar[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]YTD[/TD]
[TD]YTD[/TD]
[/TR]
[TR]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Target[/TD]
[TD="class: xl73, width: 79"][/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"][/TD]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Target[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Achieved[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Target[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Achieved[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Target[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Achieved[/TD]
[TD][TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Target[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]Target[/TD]
[TD]
[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]15 [/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

****** id="cke_pastebin" style="position: absolute; top: 72.8px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">[TABLE="width: 158"]
<tbody>[TR]
[TD="class: xl73, width: 79"]Achieved[/TD]
[/TR]
</tbody>[/TABLE]
</body>So I want a foumala that would sum the YTD target if I select May , it would sum Apr to May. The Same for achieved.

Any help would be much appreicated.

Thank you

Wes
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hello

What you want to do here is two things. Firstly change the date headings to be actual date values (e.g. 31 May 2018 instead of May). You can apply a custom format so the date appears as "May". So when you "select May" instead you select 31 May 2018. Secondly, you want to use a SUMIFS function - this will sum values based on more than one criteria.

See here:
https://support.office.com/en-us/article/sumifs-function-c9e748f5-7ea7-455d-9406-611cebce642b

Your first criteria will be the date is less than or equal to what you selected, the second criteria is that you only want to "target" values (or you want the "achieved" values).

Something like this:
=SUMIFS(B3:Y3, $B$1:$Y$1, "<="&MyDate, $B$2:$Y$2,"Achieved")
where row 1 contains the dates, row 2 contains the words achieved and target and row 3 contains the values - assuming they are in columns B to Y. "MyDate" would be a reference to the cell where you select the date.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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