Calculation weekly quantities based on monthly data - excel

I have been struggling to solve an issue to calculate monthly packages sales based on purchases during defined weekly time ranges. I have the following sample data:
Original Data :
The sales quantities are for two products A and B combined. A buyer X purchases 5 B packages on the first week of every month, another 4 on week 6 then 4 packages every 10 weeks.
I added the highlighted columns to the original table. I tried the following but the calculation I made in column E seems to be the sum of sales for B packages from the actual month until the end of the year rather than only for the current month. The formula I used in cell D2: '=(C2-6)/10', i.e. calculating how many 10-week ranges during the year after deducting 6 weeks. The formula I used in cell E2: '=5+4+4*D2', i.e. 5 is the initial quantity in week 1, 4 is the quantity in week 6 then 4 times the amount of 10-week ranges.
Calculation :
Is there a way, or a formula to calculate the monthly sales quantity for product B only?

I design from scracth the table to reflect the model I have understand:
Column D is for sales the first week of the month, column E is for sale on week 10 and column F is for sales every 10 weeks.
Formulas are spanish but are easy:
mes stands for month
si stands for if
residuo stands for residual
suma stands for add
It's quite complex and there are many many criterion when we try convert weekly sales in monthly sales. My criterion was every day of a week computes to the month of the Monday of that week.
I hope have met your requirements.

Related

Values of different time periods summed up and matched to certain dates

I have the following Excel spreadsheet.
The spreadsheet is used to plan sales campaigns. The user enters the start and end date of the sales campaign in Column B and Column C. In Column D the duration (number of days) is calculated from those dates. In Column E the user enters the revenue for the entire campaign. In Column F:L the user divides the revenue over the days of the duration.
In Column N each day of the year is listed.
In Column O the sum of the revenue based on the values in Column F:L should be calculated.
For example Campaign A starts at 2018-01-01, takes 4 days and therefore 300€ go to 2018-01-01, 100€ go to 2018-01-02 and so on ....
The same applies for all following campaigns.
Therefore, in Column O the sum of the revenue of all campaigns should be calculated so on 2018-01-02 to the 100€ from the second day of Campaign A the 120€ from the first day of Campaign B should be added. Thus, the total is 220€.
Do you know a formula that I can use in Column O which does exactly the calculation described above?
Sumproduct will iterate through testing whether the date is in the range, find where it lands in that range and return the correct value to be summed.
=SUMPRODUCT((N2<=$C$2:$C$5)*(N2>=$B$2:$B$5)*("Day " & N2-$B$2:$B$5+1 = $F$1:$L$1),$F$2:$L$5)

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: Sum partial weeks for EOM report

I'm looking for a formula that will let me get a weekly total of a daily totals column during partial weeks at the end month for Excel 2010. Using the US week of Monday-Friday.
I have a Day(A), Date(B), Daily Total(J) and Weekly Total(N) column for one month. I'd like to show the totals for the week (M-F) either on Fridays, or the last day of the month. For full weeks, if the Day="Fri", I can sum column J by using a 5 cell range like $J11-$J15 which would sum the daily totals from Monday thru Friday of a full week in the middle of the month.
That doesn't work for a partial week at the beginning, so I have modified versions for the first 5 days, if a Friday is detected and that seems to work. I'm open to other ideas if there's a better way to handle the first week.
--------------------------------------------------------------------
A B J (N) Week
1 Day Date Total Total Formula for Column N Week Total
2 Thu 1/1/2015 1 =IF($A2="Fri",$J2,"")
3 Fri 1/2/2015 2 3 =IF($A3="Fri",SUM($J$2:$J3),"")
4 =IF($A4="Fri",SUM($J$2:$J4),"")
5 =IF($A5="Fri",SUM($J$2:$J5),"")
6 =IF($A6="Fri",SUM($J$2:$J6),"")
--------------------------------------------------------------------
A6/N6 would be the last possible Friday for the first 5 days of the first week, so the rest of the formulas, until towards the end of the month are similar to:
N7 would be =IF($A7="Fri",SUM($J3:$J7),"")
N8 would be =IF($A8="Fri",SUM($J4:$J8),"")
It handles summing a 5 day full week, in the middle of the month, and only shows the weekly total in column N for Fridays.
I don't know how to handle the last week since it could be a partial week of between 1-4 weekdays, not ending on a Friday. I still want show a total for that last partial week, on the last weekday of the month.
I thought about checking to see if the days in the last week were either Friday or the end of the month, and came up with a check for either "Fri" or the end of the month. For example in January day 31 would be:
(N32) =IF(OR($A32="Fri",EOMONTH($B$2,0)=$B32),SUM($J28:$J32),"")
That works if and only if, the 31st is a Fri, but doesn't work if Jan 31st is a Mon-Thurs since the range to sum is fixed at 5 days ($J28:$J32) and I don't know how to make it variable, based on how many days are in that last week of the month.
I would appreciate your ideas on how to do a monthly report where it can show weekly totals for full or partial weeks. The "plan" is to have 4 empty master workbooks to use for months with 28, 29, 30 and 31 days since I don't know how to make it all purpose and not screw up borders.
Thanks!
Does your data include Saturdays or Sundays? I'm assuming not. If not then you need to check whether the date is the last workday of the month....or a Friday.....and you could just sum everything in column J up to that point and subtract the column N totals form above, i.e. in N2 copied down
=IF(B2="","",IF(OR(A2="Fri",MONTH(WORKDAY(B2,1))<>MONTH(B2)),SUM(J$2:J2)-SUM(N$1:N1),""))
I assume N1 will contain a text header

Indexing a sum of values by row from multiple columns

I'm struggling with this one...
http://postimg.org/image/50itqsz2x/
I've added a link to a screenshot, because I can't post images here...
In row 2 i have week numbers up to week 9 in this example. Row 1 has a formula that determines to which month a week belongs. In this example, week 5 is in month 1 and week 6 in month 2.
I need to sum the values by weeks and categories and show them in another table as monthly values as given in the example.
In B10 use this standard formula.
=SUMIFS(INDEX($B$3:$J$7,MATCH($A10,$A$3:$A$7, 0),),$B$1:$J$1,B$9)

How to calculate a monthly average when the month is not finished

Let's say I have a 12 cells on column A with the sales for each month last year. To calculate a monthly I can do a simple formula like this in A13 =sum(A1:A12)/12. But in column B I have the sales for this year, not a complete year, and August is not finished, but I have the running amount of sales for this month, so far. What kind of formula can I use to return a more accurate average?
Eduardo
Divide the current total by the total number of days in the month that have passed so far. Then multiply by the total number of days in the month.
If you are only looking for a projection for the year I would recommend this:
Divide the sum you have for the current year * 365 so far in the data by days to date. That will give you a cheap sum.
sum * 365 / total days to date
Ideally you could figure out the ratio of revenue and you have a seasonal business:
Last year to date / last year total = Last year percentage to date
This year to date / Last year percentage to date : would project the average for the full year.
Easy 2-step process:
I have my data in two columns: Date, # of Widgets Sold
Add a 3rd column "Month", and use the month and year function to return the month for each date (format cells as a number) (e.g., =MONTH(A2)&"/"&YEAR(A2) )
Generate a pivot table using the # of Widgets Sold and Month columns that sums/averages the data by month

Resources