Excel sum from multiple columns where date between several columns - excel

I need help with excel sum calculating!
I have a table with 4 Amount Fields and 4 Date Fields
Excel Table
I need to Calculate sum from all amount columns which are in particular month and get a result like this:
January 2016 - Total Sum
January 2017 - Total Sum
etc...
I already try this:
=SUMIFS(A2:A9,B2:B9,">="&"09/01/2016",B2:B9,"<="&"09/30/2016")
for finding the sum for column A between dates in column B, but i cant figure out how to accomplish calculating sum for all Amount Columns which are between all Date Columns...
Thank You in advance for your help...

Try this:
=SUMIFS(A2:G9,B2:H9,">="&"09/01/2016",B2:H9,"<="&"09/30/2016")
Note how the columns are offset by one.

Related

EXCEL - converting a huge dataset from minutes to days

I have a huge dataset that goes from row A2 to row A105393.Each row has a timestamp of 5 minutes.
For example row A2 contains the timestamp of 2020-01-01 00:00:38 while row A3 shows 2020-01-01 00:05:38.
This goes on until the the end of 2020.
What I want is to summarize all those minutes into daily outputs. To get the daily output for 2020-01-01, I have to manually drag and use the SUM function from A2 to A289. Having a dataset containing 105393 rows, this is gonna take some while.
Is there any other easier way I can do this such that I can get the the daily outputs?
Thanks in advance!!
Edit: Here is how a portion of it looks.
Let's say I want the total demand for that whole day, how can I do this instead of dragging all the rows?
In row 2 use:
=SUMPRODUCT(B$2:B$105393*(INT(A$2:A$105393)=INT(A$2)))
It will tell the sum of column B where the date without timestamp (INT function) is the same in column A.
You can create a Pivot table and then summarize by Day.
Select any cell in the list of dates
Insert > PivotTable
Drag Timestamp to Rows & Demand to Values
Select any date cell in the pivot table
Group field
Choose Days
In pictures:
If you separate dates out into a new column, you then can get what you want easily using Data -> Subtotoal.
Use =YEAR(A2)&"-"&MONTH(A2)&"-"&DAY(A2) to get date.

How to include cells with today date in SUMIFS formula

I've got raw data in a sheet with columns containing items number, product type, date, etc...
Date format is: 25-01-18 9:20
I'm trying to get a SUMIFS formula to report number of items arrived today.
Like =SUMIFS(Sheet2!G1:G924,Criteria1,Criteria2,etc)
Any idea?
Thanks in advance
If there are times in the data you can do >= today and < today+1 to count all items on todays date, e.g. if your date/times are in column H this sums column G for all today's items
=SUMIFS(Sheet2!G:G,Sheet2!H:H,">="&TODAY(),Sheet2!H:H,"<"&TODAY()+1)
Or for a simple count of today's items
=COUNTIFS(Sheet2!H:H,">="&TODAY(),Sheet2!H:H,"<"&TODAY()+1)

how to get cumulative amount of columns under certain criteria when skipping some of them

I have a question with regards to getting the cumulative amount of some columns when skipping others (please see the picture).
Lets say on a certain row we have certain type of op units for which we have 3 columns for every month (Revenue, COS, G&A). We have this for Jan, Feb, March and then 3 columns to total the amounts for quarter 1. The next 3 columns are for April.
My question is how to make formulas that can add the cumulative amount for year to date in each category while skipping the Q1 amounts. I can do with offset but I can't skip Q1 column.
You need a SUMIFS formulas that sum amounts in columns B:P for each category but exclude amounts where B1:P1 = "q1". So for YTD Revenue the formula would be:
=SUMIFS($B$3:$P$3,$B$2:$P$2,Q$2,$B$1:$P$1,"<>q1")
Copy to the right into columns R:S and then down rows as required.
Sorry, I don't think that offset /sumif will work because of 3 different criteria.
Otherwise the month I will be selecting in row 1 after end of the table (after Dec17 and Q4) there will be 3 foxed columns that will show YTD cumulative figure which should change when the month changes

Excel SUMIFS Statement - Calculate profit for each month across multiple years

I've got three columns of data.
Sell Date - Column G - Contains the day, month and year in dd/mm/yyy format.
Month (calculated from sell date) - Column I - Contains month number
Profit - Column M - Profit in Dollars.
I am trying to calculate the profit made in each month and year.
Current formula using SUMIFS. I look at the data in Column I and if this contains a 1, and if G contains the year 2016 then it's January 2016. Think it's the year function that I don't quite get.
=SUM(SUMIFS(M9:M50, I9:I50, {"1"}, G9:G50, YEAR=2016))
You can create another column that shows just the year year(G2) or you can use this formula
=SUMIFS(M9:M50,G9:G50,">=1/1/2016",G9:G50,"<1/2/2016")
I also like this formula that allows you to reference the date in one cell and calculate a 1 month range. Put 01/01/2016 in cell A1 and the formula does the rest.
=SUMIFS(M9:M50,G9:G50,">="&A1,G9:G50,"<" & EDATE(A1,1))
The SUMIFS function doesn't like it when you alter the value of the IF parameters. It would be better to use a SUMPRODUCT formula to calculate this, for example:
=SUMPRODUCT((M9:M50)*(I9:I50=1)*(YEAR(G9:G50)=2016))
Where:
(M9:M50) are the values you wish to SUM.
(I9:I50) are the month values and 1 is the month you wish to specify.
(G9:G50) are the date values you wish to obtain the year from and 2016 is the year you are specifying.

Excel: sum the last entries at month end query

I have a list of entries on a spreadsheet with a date and a percentage score. I need help in devising a formula whereby a user can select a month end date (i.e. 31 Jan) from a drop down and the average percentage of the last 15 entries will be returned.
There may be multiple entries on the same date but only the last 15 (based on the month end date) should be used. For simplicity the entries would be input in date order.
Let me know if you require any further information.
Thank you
P
Assuming your dates are in column A, the values in column B and the dropdown in D2:
=AVERAGE(OFFSET(B1,MATCH(D2,A:A,1)-1,0,-15,1))
*For this to work, your data will need to be sorted in date order!
**Also won't work if there are less than 15 rows (I assume this wouldn't be the case anyway)

Resources