If I had a better idea how to do this, I would have been more specific in the topic ;)
I have a list of repetivite sequencial dates in column A, and the profit in column B.
I'd like to analyse which sequencial 7 days have been the most profitable.
01/01/2013 10
04/01/2013 15
08/01/2013 12
08/01/2013 21
09/01/2013 18
13/01/2013 20
16/01/2013 14
19/01/2013 25
In this example the week commencing the 13/01/13 was the most pofitable with 59.
I have 4 years to anaylse of 3000 sales.
I really appreciate any assistance or starting point.
Add two more columns YEAR and WEEKNUM in the same sheet and do a pivot
Pivot :
I found the solution was possible using the following code:
=SUM(INDIRECT("$B$"&MATCH(A1,$A$1:$A$10,0)):INDIRECT("$B$"&MATCH(A1+6,$A$1:$A$10,1)))
Using the MATCH function I was able to find the first CELL for the sale of the day (01/01/13), and then the CELL of the final sale of the day +6 days in (04/01/13)
Then using the INDIRECT function I SUM the two cells together to give me the largest range of sales in any 7 day period.
Thanks to those that helped and suggested good starting points.
I would start by getting rid of duplicate days from the left column by adding their profits together.
Then perhaps you can apply some of the answers to this question: How to find maximum of each subarray of some fixed given length in a given array
Related
i need find formula in excel to how can build formula in excel that's give me answers about predecessor and successors best time for calculate, example i have 4 activities with 10 total days 1 task duration is 3 days 2ND is 4 days 3rd is 3 days and 4th is 5 days now I need to find formula that when I give them duration and dates calculate and gives me best time offering ,
Thanks for answering 🙏🙏
I'm having a hard time getting my head around what I think is a simple enough problem.
I have an Excel table of hours by day for each user i.e.:
Date1, Date1+1, Date1+2, Date1+3,... Date1+n
User1 8 8 4 6 ... 2
User2 5 2 8 3 ... 7
User3 0 7 5 0 ... 8
For forecasting purposes this grid looks several months into the future.
I do my work daily, others want it by week. I'd like to automatically generate the same table of data but rolled up by WeekNum.
I tried setting a year-weeknum at the top of the daily table and then using a SumIfs function to compare the user name and week num to sum up the daily hours in another tab for weekly data but I just couldn't get it to function properly.
=SUMIFS('Act - Forecast Hours'!$G$6:$AAL$35,'Act - Forecast Hours'!$A26,$A25,'Act - Forecast Hours'!S$4,O$3)
I think I'm overcomplicating a solution, any help is appreciated.
TIA
Rob
OK, I may have come up with an approach.
Since on my main Hourly Sheet the format is fixed, i.e. each week is 7 days and increments.
I setup a second sheet where I called a vertical and a horizontal offset and used the following formula:
=SUM(OFFSET('Act - Forecast Hours'!$G$9,$A5,D$2,1,7))
$A5 and D$2 refer to offset counts that increment by 7. As you copy the formula to each cell it increments the Row / Column to point to the right spot. Then for the Height and Width I look at a grid 1 row high and 7 wide to select each day of the week.
It works, I'm happy. I'm certainly interested in a more refined approach if there is one :-)
Thank You to anyone that does read through the question!
Regards
Rob
I have a table which represents the brands and stock for last 10 months. WHat I need is:
Identify the SKU which have been sold less than 10 (quantity) for last 10 months.
The problem is that sometimes the december stock is 6 but January stock is 31, and if I subtract that I get -25. And this alters the formula and I am unable to calculate the products which have been sold less than 10 times for last 10 months.
I use the formula like below :
=IF((D2-E2)+(E2-F2)+(F2-G2)+(G2-H2)+(H2-I2)+(I2-J2)+(J2-K2)+(K2-L2)+(L2-M2)<10;IF((D2-E2)+(E2-F2)+(F2-G2)+(G2-H2)+(H2-I2)+(I2-J2)+(J2-K2)+(K2-L2)+(L2-M2)>0;"Overstock";"No Overstock"))
Thanks in advance !
I think you should be able to use SUMPRODUCT in order to achieve your results:
=IF(E2>D2,SUMPRODUCT(E2:L2-F2:M2),SUMPRODUCT(D2:L2-E2:M2))
Afterwards, you can simply use =IF(AND(N2>0,N2<10),"Overstock","No Overstock") to mark the amount as Overstock or No Overstock.
Let me know if it works for you.
Kindly use SumIfs() formula for this issue
I'm trying to subtract Column B from Column A in excel to find out how many hours have passed between these two times but so far no luck.
Column A | Column B
05/01/11 11:54 | 05/01/11 08:46
I appreciate your help
Tried all the TIME related functions and did lots of research online but nothing.
The following formula should do what you want:
INT(A2-B2)&" days "&TEXT(A2-B2,"h"" hrs ""m"" mins """)
You can use the hour function
Hour(B1-A1)
which gives 3
Here is a link to another solution: https://stackoverflow.com/a/2324935/4293532
Note: Make sure that your data are formatted as dates, they are generally aligned to the right.
If you want it in hours rather than days and hours
=(A1-B1)*24
(which can be rounded down if you want whole hours)
I am working on an excel sheet where I am required to calculate average number of days the stores in a city were able to make some sales. I am attaching a sample of the table for reference. The values in the cells represent the number of units sold(not relevant to this question).
Here across NY, two stores are present, and out of the total number of days in consideration (3*2), only 4 days some sales were made, making the average 66%.
Similarly for Paris, there exists only one store which was open across all days.
To arrive at the figures, I tried using nested countifs and SUMIFS , but did not receive the expected results. Also, in some of the older posts, users had suggested to use INDEX MATCH with SUMIFS, but I was not to get accurate results using these.
Can anyone help me to get the correct figures for Total days, and Days with some sale.
SUMPRODUCT SOLUTION
=SUMPRODUCT(--(A$2:A$5=A8)*--(C$2:E$5<>""))
=SUMPRODUCT(--(A$2:A$5=A8)*--(C$2:E$5<>"NO SALE"))
=ROUND(C8/B8,4)
First, according to your grid NY made sales on 4 of the 6 days. (NY1: Mon, Wed; NY2: Tues, Wed). Thus the average is not 50% but 66%.
Second, to get your formula. Assuming "Place" is in column A. Below is for NY, you can solve for the rest.
Total number of days:
In cell "C9": =COUNTIF(A2:A4,"=NY") * 3
Days with sales:
In cell "D9": =COUNTIF(C2:E2,"<>NO SALE") + COUNTIF(C4:E4,"<>NO SALE")