Need help with YTD formula - 2 Part Question for simple Spread Sheet

DataValidator

New Member
Joined
May 8, 2014
Messages
5
Hi Everyone,

It would be awesome, if someone can help me with a two part excel question:

I have a simple spreadsheet showing budget/actual numbers in columns for January through December per individual line items in column A (Data Tab). Each month, actual /budget numbers will be entered for that month. I want to create a formula to calculate YTD totals by figuring out which month it is (D7 in Summary Tab) and summing the correct totals for each month per line item. In other words, if May actuals have been entered, I want the year-to-date formula to contain Jan+Feb+Mar+Apr+May totals. I am trying to create this formula in the "Summary" tab in cell F10 which references cell D7 per line item.

Part 2:

I am having trouble trying to create a formula to display the actual Year to date text string in cell F7 in the Summary tab. For example, in the summary tab, if cell D7 displays Apr, I want cell F7 to display the words Jan - Apr.

Any help would be greatly appreciated!! Thank You. I attached an example file for reference![TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[/TR]
[TR]
[TD]1000 [/TD]
[TD]Commission[/TD]
[TD]$26500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2000 [/TD]
[TD]Revenue[/TD]
[TD]$1000[/TD]
[TD][/TD]
[TD]$3544[/TD]
[/TR]
[TR]
[TD]3000[/TD]
[TD]Salary[/TD]
[TD][/TD]
[TD]$32400[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4000[/TD]
[TD]Expense[/TD]
[TD][/TD]
[TD][/TD]
[TD]$2555[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Depending on your fiscal year / calendar, you may have to adjust. A simple way is to set up 1 input cell to enter the date/month.

Above the months the the table posted above, set up a few 'helper cells' that return 1 or 0 depending if your input is greater than or equal to the month list below.

=if(month below <= input month, 1 , 0 )

then you can use the sumifs() function to sum your YTD. Depending on how your headers and input cells are formatted, you might use some date functions to help the formula:
=if(month(A1)<= month(b1), 1, 0)
or
=if(month(datevalue(a1&" 1, 2014"))<=month(datevalue(b1&" 1, 2014")),1,0)


Part 2:
F7: ="Jan-"&a1
Depending on how it's formatted.
F7: ="Jan-"&text(a1,"mmm")
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

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