Conditional if and sum - excel

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

Related

How to calculate delayed revenue in excel

I am trying to calculate revenue that is delayed by 4 months from the beginning of the year before receiving the full expected amount in month 5 and for the rest of the year.
In the attached picture you see that I expect 10,000 every month in 2021 with a 4 month ramp meaning in month 1 I will only receive 2,500 which is 10,000/4. In month 2 I will receive 5,000 which is 20,000/4 (10,000 from month 1 + 10,000 from month 2) and so on.
The problem is that the formula I use =SUM(OFFSET($G$14,0,0):G14)/$G$16 continues to sum and divide after month 5 and I would like it to stop at month 4.
I'd appreciate any help on tweaking my formula or recommending one.
Thanks
So I played around with the formula and figured out a solution. Tweaking the formula to the below allowed me to resolve the delayed revenue in case it helps anyone else.
=SUM(OFFSET($G$14,0,IF(MONTH(G11)<=$G$16,$G$16-$G$16,MONTH(G11)-$G$16)):G14)/$G$16

How to reference one value to various cells, depending on a date?

Please have a look at the picture I attached, it'll make understanding my problem easier because it's hard to describe.
In the first table, I have capacity data for a product. The capacity changes by the date indicated in the column, i.e. from July 2017 the capacity would be 56, from December 2018 78, and from October 2019 99. The reason why I don't write down the capacity for every month is that I want to save columns.
In the second table, I have every month. I want to reference the correct capacity for each month, e.g. it would be 56 for every month until December 2018.
I have been considering an =INDEX function, but it seems to complex for that. Is there a way to reference like this without using VBA? Would the VBA solution be simple? Or am I forced to write a column for every month's capacity in the first table? Thank you!
https://i.imgur.com/mRoBtTo.png
You can simply use several IF statements to compare the month in your column with the months given in your first table, and put the value of the correponding month.
Let's admit your first row is 1 and first column is A, it should give something like:
= IF(D7>=$F$2; $F$3; IF(D7 >= $E$2; $E$3; IF(D7 >= $D$2; $D$3; "")))
I dont see you columns and rows so i hope you will change them correctly on this formula:
=HLOOKUP(C111,$C$106:$P$107,2,TRUE)
C111 is the cell above your red row.
$C$106:$P$107 is the tableof capacities, i know it is bigger then the current one so you see you can add more columns.
2 is the row number from the capacity table.
true is becouse you dont want it to be the exact value it will take the previews in hte order of items
Both previous answers work perfectly, but I would go this way-
You don't actually need an if to find the previous capacity. you can simply use the approximate match (similar to the hlookup answer) in an index formula
=+INDEX($B$4:$E$5,MATCH($B$9,$B$4:$B$5,0),MATCH(C9,$B$4:$E$4,1))
The product $B$9 matches exact (0), but the date C9 is bigger than or equal (1).
$B$4:$E$5 is the source of capacity and
C9:AF9 the date timeline
Final advantage would be that you can have several products to index, not only a single one.
Could you please try the below formula and provide feedback please?
=IF(AND(D8>=D2,D8<E2),"56",IF(AND(D8>=E2,D8<F2),"78",IF(D8>=F2,"99")))

How to calculate no of days where sales were made in MS excel using sumifs and countifs?

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")

Sum product for all the months if 2 tables match

So I have this issue, I have two tables one is employees, and another one is the projects.
Employees Table:
Year Name Type Jan Feb
2018 Kevin Salary 5000 2000
2018 Kevin Insurance 200 400
2018 Alex Salary 3000 4000
2018 Alex Insurance 300 400
Projects Table
Year Project_Name Employee_Name Jan_Hours_Worked Feb_Hours_Worked
2018 Apple Alex 7 5
2018 Apple Kevin 5 0
2018 LG Kevin 0 3
Now I am creating a result list of all the projects and costs recurred for them, what I need is for each project in Table 2 to find which employees are involved and then use that to find related costs for the employee from the Table 1 and calculate total costs for that project.
(e.g for project LG, I have Kevin working on that in Feb,for him company paid 4400(salary+insurance) in Feb and the costs recurred for the LG project would be 4400 divided by hours spent on the project which Kevin in total spent 3 hours; e.g.2 for the project Apple it would be the same but sum of Kevin's and Alex's costs from Jan and Feb, so Kevin: 5200/5 + Alex:3300/7 + 4400/5)
Now I have the formula to calculate this for 1 months which is something like this
=SUMPRODUCT(SUMIFS(Employees[Jan], Employees[Name],Project[Employee_Name], Employees[Year], 2018 )/Project[Jan_Hours_Worked],--(Project[Project_Name]=K14))
I need to find how to get the yearly result per project without repeating the formula 12 times, also with this formula, i get div to 0 error when an employee didn't work on particular months, so that needs to be sorted somehow. Any Help?
I suggest you to change how you store your data. If you can make some minor changes, then you can have an easy way to get the information you want, and also a Pivot Table with a summary of cost recurred for each proyect and which employee generated that cost.
IMPORTANT: For this answer to work, you must make sure that every Employee's Name is UNIQUE. If not, adapt the example trying to create
an Employee's ID or something.
Also, please, note i got a spanish version of Excel, so screenshots are in spanish but I will translate formulas :)
Ok, first of all, I changed the design of your table Employees. Creating a column for each month is kind of annoying. Use just a column to get the month. You can type the month in a cell just like 01/2018 and Excel will change it instantly to format mmm-yy (Jan-18)
This is how your Employees table should look:
The column TOTAL COST is just a sum of SALARY + INSURANCE. If you have any other concept, just add it as a column and modify the TOTAL COST COLUMN to include it.
Second, the table Project, I think it should be like this:
The column Employee Cost has an Array Formula.
IMPORTANT: Array formulas are inserted pressing CTRL+SHIFT+ENTER
The formula is (I used same names for tables, so copy-pasting should work for you):
=INDEX(Employees;MATCH(Project[[#This row];[Employee_Name]]&Project[[#This row];[Month]];Employees[Name]&Employees[Month];0);COLUMN(Employees[[#Headers];[TOTAL COST]]))
If you typed the formula right, you should see { at start and } at end.
The formula in Cost Recurred to Project is just a division of Employee Cost / Hours. Added an IFERROR when the hours worked are 0, then show 0.
=IFERROR(Project[[#This row];[Employee Cost]]/Project[[#This row];[Hours]];0)
And last step, your Pivot Table. Create one and organise it to get the sum per hours and month and proyect you want. You can get one like the one below:
As you can see,e.g. for project Apple, you can see that total cost is 2.391,43
but also you can see the cost of each Employee. Pretty cool I think.
I really hope you can modify the design of your data, because Excel is designed to work going down (I mean using rows) more than using columns. Excel 2007 got more than 1 million of rows and just around 16.000 columns, so it's designed to work vertically.
Hope this helps, or at least, give to you a clue of how to proceed :)

Excel - Analyse the best weeks sales

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

Resources