Cumulative Monthly Reporting by Salesperson - excel

Below there is a link into my file, in which i'm having trouble to get monthly cumulative data. I want to get final Cumulative monthly data according to the salesperson and the product type. By cumulative i mean for example, if I choose May I want to get collective data starting from July till May.
https://drive.google.com/open?id=0Bx5QZn9WpBBOT1VtX3hSOTJMVlE

The SUMPRODUCT() formula will do what you want:
=SUMPRODUCT(($F$2:$F$330=B$2)*($G$2:$G$330=$A3)*$H$2:INDEX($H$2:$S$330,0,MATCH($A$1,$H$1:$S$1)))
There are three parts. The first two find the correct rows. The last sets the full range.

Related

How can I have a formula follow a specific pattern in excel?

I am attempting to consolidate the daily ledger for a business to have a weekly sales category, however I am unable to continue the formula for summing the daily sales for a week. Is there a way I can have excel follow a pattern such as:
A
Date:
Daily Sales
Week of:
Weekly Sales
2
1/3
10
1/3-1/9
=sum(A2:A8)
3
1/4
15
1/10-1/16
=sum(A9:A15)
Rather than enter hundreds of formulas by hand I would like to have excel follow the rule of taking the next 6 cells in order to find the weekly total. Thank you.
Yes, Use INDEX()
=SUM(INDEX(A:A,(ROW($ZZ1)-1)*7+2):INDEX(A:A,(ROW($ZZ1)-1)*7+8))
Put that in the first cell and copy down.
INDEX, Unlike OFFSET and INDIRECT (which both can be used here), is not Volatile.

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.

Excel Formula to work out incremental figure defined by various monthly results

I need a formula or VBA to help me calculate the below;
The base rate for a x sale will be £2.00 per sale
This will increase by 50p per sale if you deliver 100% attendance in the previous month to a maximum of £5.00 per sale.
Think im along the right lines with a ifand but I am struggling to create the formula to reset values if a poor month attendance is not achieved.
example of sheet
New exampleenter image description here
Is it something like the following you need:
=J3*(2+MIN(3,(8-MAX(IF(B3:I3<>1,COLUMN(B3:I3)*1-1,0)))*0.5))
(Entered with CTRL+SHIFT+ENTER.)
Update: If you don't want to reference the current (right-most) month in your calculation, use:
=J3*(2+MIN(3,(7-MAX(IF(B3:H3<>1,COLUMN(B3:H3)*1-1,0)))*0.5))

Need to figure out an average of cells based on 22 days prior to today

I have an all-encompassing spreadsheet in Google that I need to total up based on a date. I need to figure out the daily usage of items going out based on the date. So.. I have a column (A) with dates. Each cell =today(). I have a column with outgoing items (I). I need to average items in column I based on the last 22 days. Any help?
I also need to figure out weekly and monthly totals, but that can be another topic.
=AVERAGEIF($A:$A,">"&TODAY()-22,I:I)

Excel to specify the month to report the data

Using excel, is it possible to specify the month to report in a cell?
For example, excel would need to report the latest reported sales, if its available. If the month of February sales is not available, then it will report January sales. Likewise, if March sales is available, it would report the sales in March.
How do you write this formulae in a cell in excel? If its not possible to write such a formuale, can we write a vba to do this?
If you mean you have a list of sales entries and want the sales for the last month in the data, you could write one formula to get the latest month. If months are in A you could write: =month(max(A1:A99999))
Note if you have multiple years data, you need to pull the year too or get bounding dates. You can then sum sales using an array formula like assuming the result of the first action is in D1 and sales are in B: {=sum(if(month(A1:A999999)=D1,B1:B999999,0))}
If you have incremental updates during the month, this will return month to date data. If you need data for the last full month, you can use another array formula to get the maximum month where the date is the last day of the month.
If the cells for future data in B1:B12 are blank then you just need to extract the last number in B1:B12 don't you? If so then try
=LOOKUP(9.99E+307,B1:B12)
You can use the OFFSET function to select specific data based on the month.
Insert a formula to calculate the current month (or just type in the month number)
=MONTH(TODAY())
The formula to select the current months of sales data
=SUM(OFFSET(B1,MONTH(TODAY()),0,1,1))
Have a look at the help in Excel on the OFFSET function. It can be used to select a range of data. For example, to return data from the start of the year to the current month the formula would be:
=SUM(OFFSET(B1,1,0,MONTH(TODAY()),1))
If the current month does not contain data yet, you can test to see if a value is returned and revert to the prior month if there is no data.
=IF(SUM(OFFSET(B1,B16,0,1,1))=0,SUM(OFFSET(B1,B16-1,0,1,1),SUM(OFFSET(B1,B16,0,1,1))))
I found this answer:
=IF(B12<>0,B12,IF(B11<>0,B11,IF(B10<>0,B10,IF(B9<>0,B9,IF(B8<>0,B8,IF(B7<>0,B7,IF(B6<>0,B6,IF(B5<>0,B5,IF(B4<>0,B4,IF(B3<>0,B3,IF(B2<>0,B2,IF(B1<>0,B1,0))))))))))))
This formulae solves the problem of picking up the latest available data.

Resources