Year to Date formula

exuberant

New Member
Joined
Oct 30, 2014
Messages
41
I am still trying to figure out which sums current month and all previous months.

For example, current month is June so the formula should sum up January to June. And this shall be dependent on the current month.

Thanks in advance
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Explain more. You can't sum months. January plus february Plus March etc doesn't equal anything. It's not a number.
 
Upvote 0
Explain more. You can't sum months. January plus february Plus March etc doesn't equal anything. It's not a number.


Sorry for the confusion,
I meant that A1 to L1 contains the months while A2 to L2 contains the values.
I need the year to date values based on the current month
 
Upvote 0
Well if Jan numbers are in cell A2 and then the values for every month after that are in cell B2, C2 etc. then put the following formula in cell A3 and copy across the page.

=sum($A$2:A2)
 
Upvote 0
Removed as don't believe it is what the OP wants
 
Last edited:
Upvote 0
I meant that A1 to L1 contains the months while A2 to L2 contains the values.
I need the year to date values based on the current month

This assumes that your month values in A1 to L1 are text values and not dates formatted as mmm.

Excel Workbook
ABCDEFGHIJKLMNOP
1JanFebMarAprMayJunJulAugSepOctNovDecDec59
2835110159442759
Sheet1
 
Upvote 0
maybe I'm missing something, but if it is only the current Year to date and you want the total in M2 why not simply sum the line: =SUM(A2:L2) This will work since future months will presumably have 0 value?

Just a thought.
 
Upvote 0
This assumes that your month values in A1 to L1 are text values and not dates formatted as mmm.

Sheet1

ABCDEFGHIJKLMNOP
1JanFebMarAprMayJunJulAugSepOctNovDec Dec59< Current Month manually input into cell N1
28351101594427 59< Current Month automatically the month of today

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:36px;"><col style="width:29px;"><col style="width:45px;"><col style="width:45px;"><col style="width:331px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
O1=SUM(A2:INDEX(A2:L2,MATCH(N1,A1:L1,0)))
O2=SUM(A2:INDEX(A2:L2,MATCH(TEXT(TODAY(),"mmm"),A1:L1,0)))

<tbody>
</tbody>

<tbody>
</tbody>


This is ace! You just saved my day! Thanks a lot!
 
Upvote 0
Hi FormR, I accept that either reason is highly likely, but sometimes the simplest solutions are sufficient.
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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