How to add cells together if it is a certain month - excel-formula

In Excel, I have tabs set up for YTD and each month. I'm trying to add volumes and revenue for the year, but only when it's a certain month. So for July, I want the YTD tab to only sum July. For August, I want to sum together July and August, and etc. for the remainder of the year.
I've tried different "If Month=7, then...." formulas, but they either only count the specific month (only July) or they return an error when I try to add in 2 months (July and August).
My goal is that when I have the formulas set up, I won't need to manually adjust the YTD tab formulas to include the current months, but it will automatically update. So on July 31st, it will automatically sum up the July tab. But when it turns to August 1st, it will start automatically summing up the July and August tabs.
July 31st:
Volume = July Volume
August 1st:
Volume = July Volume + August Volume
Excel Q Example Sheet

Related

countif adding up how many are in a certain month

I am trying to get a formula that counts up how many cells contain this month and how many cell contain < than current month eg: in a column
March 2015
January 2016
April 2016
May 2016
May 2016
May 2016
June 2016
And then have a cell at the bottom that tells me 3 for May and 3 out of date
Assuming your data were in column A and you had 15 points, then the following two formulae should work.
Number of cells in the current month:
=COUNTIF(A1:A15, "5/1/2016")
Number of cells before the current month:
=COUNTIF(A1:A15,"<5/1/2016")

Conditional format to highlight date in date range

I have set as dates in row A all the Sundays of the year from A7-A60. I would like a conditional format so the current Sunday will be always highlighted whenever one opens that excel file.
I've tried setting that with WEEKDAY but could get it working.
I assume that by "current Sunday" you mean the one just passed, so on Saturday 3rd Jan the previous Sunday (28th December 2014) will be highlighted.....but during the period from 4th January to 10th January 2015 the Sunday 4th January 2015 date will be highlighted ...and so on through the year
To do that select the whole range and use this formula in conditional formatting:
=A7=TODAY()-WEEKDAY(TODAY())+1
That works because the formula =TODAY()-WEEKDAY(TODAY())+1 always gives you the previous Sunday, so it's sufficient to see if A7 matches that date.
As your range only contains Sundays this version will also work in this case
=(A7<=TODAY())*(A7>TODAY()-7)
.....because that will highlight any date in the current week

Excel Workday not excluding Thanksgiving

In 2002, Thanksgiving was on the 28th of November. So two working days before Monday, Dec 2nd should be Wednesday Nov 27th.
But
WORKDAY(A1,-2) Where the cell A1 has the value 12/2/2002 stored
gives me 11/28/2002
Is there a command or option that keeps track of the days financial markets are closed in the US?
No, but =WORKDAY can be modified to take account of days to exclude to suit.
Syntax is WORKDAY(start_date,days,holidays)
Holidays is an optional list of one or more dates to exclude from
the working calendar, such as state and federal holidays and floating
holidays. The list can be either a range of cells that contain the
dates or an array constant of the serial numbers that represent the
dates.

Excel - Sum values based on date

I have a cell that includes a drop down list of months for a user to select from.
What I would like to do is use whatever month is selected in the drop down to drive sums in the workbook.
For example, in one sheet I have the the drop down list of months in C4.
In another sheet I have dates and corresponding data (starting in A1 and A2):
July August September October etc... YTD Total
50 100 75 60 etc... ?
So what I'm looking to achieve here is to sum the monthly figures up to the date selected in the drop down menu by the user, i.e. if September is selected in the drop down - then the YTD total will include July, August, September (NB - financial year starts in July, not Jan).
Thanks in advance people.
Using INDIRECT you can create the range reference for the SUM from a string.
Something like this:
=SUM(INDIRECT("R2C1:R2C"&MATCH(C4,A1:E1,0),FALSE))

Excel display nth day of current month

I have a list of recurring bills. Some are on the 1st of every month, and some are on the 15th or 16th etc. What I want to be able to do is display this day within the current month. So if it is February, and the bill recurs on the 9th every month, my cell will show 02/09/12, and if it was march, it would show 03/09/12. Is there a formula or macro to accomplish this?
Found it to be: =DATE(YEAR(TODAY()),MONTH(TODAY()),18)
If you have the number 9 in A1 this formula will show the 9th of the current month (whether that be in the future or the past)
=TODAY()-DAY(TODAY())+A1
edate(start-date),1)
ie edate(B3,1)
b3= 1/5/13
Result = 5th of 1 month later - 2/5/13
3 for quarterly, 12 for annual

Resources