I'm currently working from two worksheets, a main data sheet titled 'Equities' which details the stock trading data undertaken on a daily basis. I've attached a screenshot of the column labels below for this worksheet.
I have a monthly commission worksheet which draws information from the equities sheet using sumifs to return results to a relevant date range. I've attached the column labels screenshot below and the date column to show how it is categorised.
=SUMIFS(Equities!L:L,Equities!A:A,">=1/10/2018",Equities!A:A,"<=31/10/2018")
The above sumif returns an accurate result for the gross revenue USD column on the monthly commission worksheet. I have tried to adjust the sumif by adding an additional criteria so as to have monthly figures for Trader 1, 2, 3 etc.
=SUMIFS(Equities!$N:$N, Equities!$L:$L, Monthly Commission!$C1, Equities!$A:$A,">=1/10/2018",Equities!$A:$A,"<=31/10/2018"
The SUMIF above is the one I've edited to include the trader as an additional criteria. However, it has not worked and returns a 0 value, and also prompts me to open a file. I'm not sure where the error is in the syntax or composition of the sumif, so any advice on how to correct it would be greatly appreciated.
Because the name of the Monthly Commission sheet has a space in it, you need to put it in single quotes:
=SUMIFS(Equities!$N:$N, Equities!$L:$L, 'Monthly Commission'!$C1, Equities!$A:$A,">=1/10/2018",Equities!$A:$A,"<=31/10/2018")
The incorrect column was being summed, answer provided by #XORLX.
=SUMIFS(Equities!$L:$L, Equities!$N:$N, 'Monthly Commission'!$C1, Equities!$A:$A,">=1/10/2018",Equities!$A:$A,"<=31/10/2018")
Related
Many thanks for your help in advance. I need help finding a way to sum specific values in the Grand Total row of a Pivot Table based on the corresponding column label. The challenge is that the row that the Grand Total is in isn't fixed, meaning in one instance the Grand Total may be in row 9, then after data addition/removal, it will be in a different row. Also, multiple columns match the criteria.
The attached image show what the Pivot Table looks like. I2 and J2 show the output I need regardless of which row the Grand Totals are in.
Credit to #DavidLead for pointing me in the right direction. The three screenshots attached to this answer are a supplement to the guide for using the GETPIVOTDATA formula in excel. I am using Excel 365.
In the first screenshot, you will see the raw data reformatted to have our columns, i.e. Name, B, A, and Month. Cell N2 shows the total/sum for A. in January and the formula is shown in the second screen capture, Cell O2 shows the sum/total for A. for all months combined. The formula is also shown in the second screenshot.
Regardless, you will see in the formulas for N2 and O2 that I reference the cell $G$1. This tells the formula which pivot table to look for the "A.". Then in the third position of the formula, I reference the Pivot field list column name "Month", and in the third position, I specify "January".
The formula can return 1 to 126 pairs of field names and item names that describe the data that you want to retrieve. In my case, I could have retrieved the total for John in January or for all months.
For example,
Total for John in January
=GETPIVOTDATA("A.",$G$1,"Month","January", "Names","John")
Total for John, January thru March
=GETPIVOTDATA("A.",$G$1,"Month","January", "Names","John")+GETPIVOTDATA("A.",$G$1,"Month","February", "Names","John")+GETPIVOTDATA("A.",$G$1,"Month","March", "Names","John")
The benefit of this formula is that if the Grand Total row changes I will always get the sum of A. and/or B. for all months. It is dynamic and is what I needed to accomplish.
Formula Explanation
`=GETPIVOTDATA("A.",$G$1,"Month","January")`
"A." = the column that has the data I need
$G$1 = the reference to the Pivot Table (Microsoft's
knowledge article states this can a reference to any cell, range of
cells, or named range of cells in a PivotTable. This information is
used to determine which PivotTable contains the data that you want to
retrieve.)
"Month" = the column I need
"January" = the name of the row for the total I need
To get the total for "A." from January thru March, I use the following formula:
=GETPIVOTDATA("A.",$G$1,"Month","January")+GETPIVOTDATA("A.",$G$1,"Month","February")+GETPIVOTDATA("A.",$G$1,"Month","March")
The most important factor of this formula is that you reference a cell in your pivot table. In my case, I used $G$1. I also tried other cells in the pivot table as reference cells, and the formula returned the correct values.
I hope this helps the next person who needs a similar solution and finds this answer. Please give this a vote if it helped you.
1st Screenshot
2nd Screenshot
3rd Screenshot
I am trying to generate a report that will show that month's total gas billed. I have two excel sheets in the same document.
The goal is to total a month's gas billing at a specific location for that month.
Conditions in the formula are Location Name, Beginning of the month, and end of the month.
=SUMIFS(Data!M:M,Data!L:L,"Olive Branch",">="&C3,'Data'!F:F,"<="&EOMONTH(C3,0))
This formula above is the formula not working for me. I am not sure what I can change. I've tried to mimic resources online the best that I could, but I'm missing something. This data is coming from an Excel form that I created as well.
Column M is Receipt Total.
Column L is Location.
C3 is The month criteria on the front sheet.
Column F is the purchase date of the gas
Front Sheet
Data Table
Including rest of data table
You needed to reference the Data!F:F range for each check against the date range, but the formula you gave only did this once.
=SUMIFS(Data!M:M,Data!L:L,"Olive Branch",Data!F:F,">="&C3,Data!F:F,"<"&EDATE(C3,1))
I need some help regarding an issue that I was not able to solve. I tried to figure it out but without reaching my goal. This is what I have:
In sheet 1 I have estimated active customers for a period of time, where columns are months and rows are departments/states:
Sheet 1
Then, in sheet 2, I'm forecasting sales and need excel to return values from sheet 1 depending on which month we are kicking-off for each department:
Sheet 2
Of course, the kick-off month may vary for each department and values from sheet 1 should accommodate according to the selected month on column B in sheet 2.
And within C2:I4 I have used this formula:
=IFERROR(IF(C$1>=$B2,INDEX(Sheet1!$B$2:$F$4,MATCH($A2,Sheet1!$A$2:$A$4,0),MONTH(C$1)-MONTH($B2)+1),""),"")
The formula above actually works great when departments are not repeated in sheet 1 but, what would happen if departments are repeated (as shown in sheet 1) and I have to sum values from the same department and show the result on each cell in sheet 2?
I look forward to your kind help!
Thanks!
Try using SUMIF like this:
=IFERROR(IF(C$1>=$B2,SUMIF(Sheet1!$A$2:$A$4,$A2,INDEX(Sheet1!$B$2:$F$4,0,MONTH(C$1)-MONTH($B2)+1)),""),"")
Please try this formula, designed for your Sheet2!C2 cell.
=IFERROR(SUMIF(INDEX(Rodrigo,,1),$A2,INDEX(Rodrigo,,MONTH(C$1)-MONTH($B2)+1)),"")
In order for this formula to work you should declare a named range comprising of your range Sheet1!A2:F4. My formula calls the range Rodrigo. If you choose another name please change the name in the formula accordingly.
You can exclude zero results by adding a further IF condition to the formula. I would prefer to do that via cell formatting, like 0;0;; where the third semi-colon determines that a zero will not be shown. You can also suppress display of zeros for the entire sheet in the worksheet options.
I needed some help with Excel functions as I am not really sure how to achieve this.
Basically, this picture shows my data structure:
I am aware that I can use Index& Match excel functions together for columns but I am not sure if it is possible use Index&Match together on two row conditions.
Requirement:
I have three products, product A, product B and Product C. I want to be able to quickly calculate the actual revenue and and you can see the data structure in the image above. My top-most row is month. For each month, I have 4 columns, of which 2 need to be calculated should the condition match.
This is the condition. An example, for product A, calculate the total sumproduct(multiples column actual customers x Price Actuals) for yearMonth 201501.
So basically,first, for product A, it would need to find YearMonth 201501, and when it is found, it should find columns Actual Customers and Price Actuals and return the SUMPRODUCT of Actual Customers and Price Actuals.
Is it possible to do this?
I have searched the Internet a bit and I have not found a solution.
Update:I thought I could post the follow-up question in the same thread insted of Cristiano duplicates... For the accepted answer, in the excel formula, how can it be divided by the total amount of "actual customers" for that month?
Simply adding "actual customers" with a slash before IT does not work.
You need a cell where you specify the month you want to look up. Give that cell the name "TheMonth".
You need a cell where you specify the product you want to look up. Give that cell the name "TheProduct".
Then, assuming your screenshot starts in cell A1, you can use
=SUMPRODUCT($B$3:$I$5*($B$1:$I$1=TheMonth)*(($B$2:$I$2="Actual Customers")+($B$2:$I$2="Price - Actuals"))*($A$3:$A$5=TheProduct))
Next time, please post a link to a workbook. It's not much fun typing in the text and numbers from a screenshot in order to verify a formula.
Here is the workbook with the formula in action.
I am trying to create a budgeting spreadsheet, I nearly have it all working except one function.
Monthly Budget Sheet: http://i.imgur.com/uLJ1AfA.jpg
In this I am trying to read all data on my Transactions Sheet column B: http://i.imgur.com/0SaWEqa.jpg
if they match the Category I have in Monthly Budget B column, I grab the value from Monthly Budget column C and add them up in Transactions column D.
This is my current function: =sumif(Transactions!B:B,A4,Transactions!C:C)
Hopefully my pictures explain what I am talking about. My issue is I also want to filter it so it only adds the values of the ones for that month. E.g. the column 'Actual' in Monthly Budget should grab the value of Eating Out categories in Transactions ONLY IF they are in January, so the first 2 in the image but not the third.
So basically I need to add some way to modify =sumif(Transactions!B:B,A4,Transactions!C:C) so that it will only take entries between 01/01/2014 and 31/01/2014.
Thanks in advance!
use the Month() formula
i think it would be alot easier if you add another column(B) on the transaction sheet after date called month( hide it if you like)
=CONCATENATE(MONTH(A2),"-",YEAR(A2))
then use the SUMIFS function to add up based on 2 criteria
=SUMIFS(Transactions!D:D,Transactions!C:C, A4 ,Transactions!B:B, "1-2015")