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)
Related
I have 3 columns, A, B, and C. In column A is the product, column B is the order date, column C is the amount paid. I'm trying to find a sum product formula that will look for the total amount paid for the entries that match the Product and were ordered during a specific time period. Below is an example formula that I am trying to use:
=SUMPRODUCT((V3:V1000=A2)*(R3:R1000,">=10/1/2021",R3:R1000,"<=10/31/2021")*(U3:U1000)
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.
I have a spreadsheet with two columns of dates when a customer expressed interest in buying an item and a column of dates when the sale was actually made. I am trying to sum the total amount of sales when the month on the interest matches the month of the sale. For example:
Date of Interest Date of sale Price
04/15/2015 04/15/2015 $4,795
04/09/2015 04/27/2015 $3,596
03/31/2015 04/22/2015 $6,477
04/16/2015 04/28/2015 $9,755
The formula I am trying to use is this
=SUMIFS(E2:E15,MONTH(C2:C15),H2,MONTH(F2:F15),H2)
Where E2:E15 is the column of sales amount
C2:C15 is the date of interest
F2:F15 is the column of date of sale
H2 is a field that contains a month number (4 for this example)
If the formula worked, it should return a value of $18,146 (the sale of $6,477 would not included as the interest date was in month 3)
However, I get an error with the formula (no specific information). Is there anyway to extract the month number from both columns within this formula? I can create additional columns that have the month number and if I use them the formula works.
Any help would be greatly appreciated
Try:
=SUMPRODUCT((MONTH(Lead_date) = MONTH(Sold_Date))*Sold_Amt)
or:
=SUMPRODUCT((MONTH(Date_of_Interest)= MONTH(Date_of_sale))*Price)
If you want to restrict your answer to the month number contained in H2, as suggested by #user3578951, then simply modify the above to add that factor:
=SUMPRODUCT((MONTH(Date_of_Interest)= MONTH(Date_of_sale))*(MONTH(Date_of_Interest)=H2)*Price)
If you create a helper column to create a column of months (in number form), you can use your formula. Just insert a column next to your two date columns, and use =Month(C2) and drag down. Then you can just use =sumifs(e2:e100,_[lead date helper month range]_,h2,_[sold date helper month range]_,h2).
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)
I'm trying to write a formula that would return a date (B) from a list if that date is within 1 year of another date (A). If there are no dates in the list that are within 1 year of date A, then date B will simply be date A plus 1 year (365.25 days).
For example: My list is [2/15/16, 12/26/17, 5/15/19]. If date A is 1/1/16, then I want Date B to equal 2/15/16. If Date A was 2/15/16, then Date B would be 2/15/17.
The closest I've gotten is:
=IF(MIN(L:L)-A<=365.25,MIN(L:L),A+365.25), but obviously this won't work beyond the minimum date. I need to check against the whole list of dates, not just the minimum date.
My end goal is to make a list like this (column A after the first date is just the previous B:
From (A) - To (B)
1/1/15 - 1/1/16
1/1/16 - 2/15/16
2/15/16 - 2/15/17
2/15/17 - 12/26/17
Thanks for any tips in advance!
If I understand correctly, this should work
=IFERROR(LOOKUP(2,1/((($A$2:$A$4-C2)<365.25)*(($A$2:$A$4-C2)>0)),$A$2:$A$4),EDATE(C2,12))
Column A has the list of dates, C2 has Date A. Running some more dates in column C, copying the formula down: