Filtering a set of data - excel

So I have a document that I work with, in which I input daily data. This data is recorded for the entire year in one spreadsheet. This data is also used to calculate monthly values for graphs and such. In order to make the input of this data simpler and less repetitive, I wanted to link the monthly spreadsheet to the yearly one, so that one only needs to fill out the yearly compilation of data.
Is there any way to write a formula that goes through the data in the yearly spreadsheet and only pulls out the data for a certain month? If so, what is the best function to use?

Assuming you have two columns, one has the date the other an amount as below:
Using SUMIFS(sum_range, criteria_range1, criteria1, criteria_range2, criteria2) will allow you to sum all amounts in the sum range ($B$2:$B$10) for any dates that fall in between two dates you specify in E1 and E2.
The formula would be: =SUMIFS(B2:B10,A2:A10,">="&E1,A2:A10,"<="&E2)

I would use =Vlookup() if you are just pulling data from the yearly into the monthly. If you are trying to calculate daily data into monthly data you could us the countif() or sumif() functions depending on what you want to accomplish. So if you are trying to add up all of the daily data to get the monthly amount you would do something like:
=sumif(range,critera,[sumrange]) range would be the celss that that months are in criteria would be the month and sumrange would be the values of the months.

Related

Excel - Take Average of Monthly Data

I have a historical data set for commodity pricing. Throughout the data set, the data starts inputting prices on specific days, rather than the average of the entire month. In order to keep the flow of having only the average pricing for the months.
In the best case scenario, I would use an Averageif function, however, the data for each month doesn't display a consistent amount of days.
How can I automate this the process: If the month is the same as the previous row and different than the next row, calculate the average of the ^ rows until you hit the next month.
Here's a simple display of what I mean:
]1
You can use a pivot table to get the output you want. It will also be neatly organized instead of having your averages mixed in with a mostly blank column. Photo below shows the set-up/output of a pivot table generated with random data.
For a solution without pivot tables, you can use the following formula :
=AVERAGEIFS($B$1:$B$30;$A$1:$A$30;">="&(A1-DAY(A1)+1);$A$1:$A$30;"<="&EOMONTH(A1;0))
The above example is from cell C1, and can be copied down the entire list. The dates are in $A$1:$A$30 and the values in $B$1:$B$30. The first conditions test on the first day of the month (calculated as A1-DAY(A1)+1),and the second condition as last day of the month (calculated as EOMONTH(A1;0)
This will obviously put the average value of the month on each row, but will also work if your data is not sorted on date. If this is the case, and you only want to display one number per month in the column (as in your own example), you can add an additional IF statement wrapped around the formula:
=IF(EOMONTH(A2;0)=EOMONTH(A1;0);"";AVERAGEIFS($B$1:$B$30;$A$1:$A$30;">="&(A1-DAY(A1)+1);$A$1:$A$30;"<="&EOMONTH(A1;0)))
So it will display empty in all cells, except where the month changes.

Column Name in Pivot table is a day Need to group by month

Good Morning,
New user here; need assistance please. My data is structured with days across a spreadsheet. t1 = 9/30/2016, u1 = 10/1/2016, v1 = 10/2/2016 etc...
The right side of the sheet s1:s711 has structured data which are the specific employee numbers i.e. 5672291. These are unique identifiers and do not repeat.
The data contained between t2:bsa711 represents the amount of sales on a given day for the employee.
I have tried several sumifs and sumproduct functions to capture the amount of sales for each employee by month. This did not work due to the multiple criteria (employees name and <= EOMONTH => EOMONTH criteria to sum the sales within the month)
My last attempt has been to pivot the data and group by month, but I am unable to produce the desired result because I can only get column names (the days) in the pivot list (1000+ due to the T-BSA range of columns/days).
My overall goal is to know the total per month I am not averse to using pivot or some type of array sumifs. Sorry that I do not have much to add to show research. I have been looking.
Thank you in advance.
Make sure the dates are formatted as dates.
Click on analyze -> insert timeline-> select column for dates.
You might want to experience with slicer and pick the days you want which is even more specific.

How to use IF and INDEX if a number falls in a table of ranges

I am trying to create a new budget template with the data I was given. I was able to summarize the data and minimize it to a table. I am trying to use an INDEX MATCH with an IF formula within a certain range. Here is my example data table:
Data Table
My two pieces of data would be the closing time and attendance.
for example, if the attendance is 17,000 and we close at 10:00 PM, I need the cell to run an IF between numerous ranges and time.
I am a little stumped on how I would approach the numerous ranges that my attendance of 17,000 would have to run.
Use INDEX/MATCH/MATCH
=INDEX(A:I,MATCH(17000,A:A),MATCH("10:00 PM",2:2,0))

Date Dependant Calculation

I've got a (Excel) sheet with running totals of income and expenses. The data from each day is fed into a weekly running total. I also have monthly expenses that I would like to include into the weekly total expense count/profit count but don't want to put each category of monthly expenses into each day's or week's input fields.
I would like to keep the monthly expenses in it's own input field but add the data to the corresponding week the bills were paid.
I've been at this for weeks but can only find solutions that end with circular references. Bonus challanges: I'm pretty happy with the size of each input field and don't want to add any more fields nor do I want to do macros or any VBA. I really just want a formula to take care of it.
Is there a way to have Excel stop adding to a total after a certain day?
Link to the sheet. https://drive.google.com/file/d/0B5qCnQJhT_vkNHZlaEpnTGRtUjQ/view?usp=sharing
it seems like you are entering your expense directly into your "dashboard" am I right? E.g. the rent 875 in cell H13. If this is the case, without a date, then you can't get Excel to intelligently place the expense to the correct week report in your dashboard.
try creating an input table and all your dashboard figures should come from the input table, utilizing functions like SUMIFS and SUMIF.
Example
Then in your dashboard
formula in H13 would be =SUMIFS(E:E,C:C,"Rent",D:D,"Check")
formula in G4, =SUMIFS(E:E,C:C,"Food",D:D,"Cash")
formula in D23, =SUMIFS(E:E,B:B,51,C:C,"Rent",D:D,"Cash")

Sum Variable-Length Week's Expenses

I'm trying to make an excel spreadsheet for someone else without much Excel experience. It's a relatively basic expense spreadsheet, with rows being a given date's expenses, and columns being the types of expenses and their amounts. I'd like to automate as much as possible with formulas or VBA.
Here is an example:
I understand how to sum up all expenditures in the table, but I'd also like to break them down on a week-by-week basis. The table will probably be added to rather infrequently, so there will be missing days. I'm not sure how to sum the weekly totals when there may be any number of entries for a given week.
For the example above, I'd like to have a column somewhere on the spreadsheet that has Week 1's sum (1/4/2015 and 1/5/2015) as one entry, and Week 2's sum (1/14/2015 and 1/16/2015) as a second entry.
Is this possible to automate with a formula or script?
I'd use a pivottable ("Insert" ribbon, "PivotTable" button on left)

Resources