SUM function in Excel - excel

I have a table in Excel:
EDITED: image reloaded
Product 1 consist of Item A-E, Product 2 consist of Item B, D & E, Product 3 consist of Item A-F.
$E$3-$E$7, $E$9-$E$11, $E$13-$E$18 are formulated to calculate the price of individual Item based on cost and pieces sold.
Is it possible to sum automatically at $E$2, $E$8 and $E$12 where there is no item (ie Column A-D for data entry, Column E fully formulated)?
Thank you!

Related

How to match up 2 columns with 2 other columns

In column A I have product id's and column B has the number of times the product in column A was quoted.
In column C I have the same product id's (but in different order) and column D has the number of times the product in column C was actually sold.
I want to match them up to add a final column in order to divide sales/quoted in order to get a value of efficiency in sales.
I believe it's an index/match/match but I'm not sure how to set it up.
Please help
Try
=B3/vlookup(A3,C:D,2,false)
In words: take the value in B3 and divide it by the value from column D where column C has the same text as A3.

Excel formulas to track sales - count and extract functions

This is an example of a sales tracking spreadsheet that I want to create.
I want column L to count the number of sales each person does but do it so that it runs in a fill series order. I have inputted data manually in column L to demonstrate.
there are approximately 11 different types of membership. As I enter the sales information in columns B to G, I want the types of membership in column G to extract to the breakdown box in columns P to T. This is so that I can see which staff member sells what types.
I want to replicate this formula to work out how much each staff member has taken financially. this would extract from H/I to the other box in column P to T.
Answer to the first part of your question:
I want column L to count the number of sales each person does but do it so that it runs in a fill series order.
Formula for cell L1
=COUNTIF($K$1:K1;K1)
For L2 it then becomes
=COUNTIF($K$1:K2;K2)

Sort list by the difference between two values

I have the following Excel spreadsheet:
A B C D
1 Budget Actual Sort by Variancy (descending)
2 Product A 500 250 Product F
3 Product B 900 800 Product D
4 Product C 300 450 Product C
5 Product D 400 600 Product B
6 Product E 700 300 Product A
7 Product F 150 900 Product E
As you can see in Column A I have listed different products and in Column B I have their budget value and in Column C the actual value.
Now, I want to list those products based on their budget-actual-variancy in Column D in a descending order (starting from the highest positive variancy).
The only formula which comes in my mind is =LARGE(B2:B7,1) but it only sorts the products by the budget values (Column B) or actual values (Column C). Not by the difference between the two values.
Do you know any formula which I can use to sort the products in Column D based on their variancy?
Please note:
I know I could add a helper column in which I calculate the differences between Column B and Column C and then go with the LARGE function on this helper column but I am looking for a solution without such a helper column.
If one has SORTBY()(Currently only available with Office 365 insiders) then put this in D2 and it will spill automatically:
=SORTBY(A2:A7,B2:B7-C2:C7,1)
You can use the following (even when there are duplicate variances):
Formula in D2:
=INDEX($A$1:$A$7,LARGE(INDEX(($C$2:$C$7-$B$2:$B$7=AGGREGATE(14,3,$C$2:$C$7-$B$2:$B$7,ROW(1:1)))*($A$2:$A$7<>D1)*ROW($A$2:$A$7),),1))
Drag down.
In case of duplicate variances it will grab the last value in column A that represents that variancy and has not been featured in column D as yet.

VLOOKUP when criteria exists mutliple times in matrix

I have the following Excel spreadsheet:
A B C D
1 Product A 500 Product A 500
2 Product B 800 Product A 700
3 Product C 450 Product A 300
4 Product A 700 Product B 800
5 Product A 300 Product B 400
6 Product C 300 Product B 250
7 Product B 400 Product C 450
8 Product B 250 Product C 300
In Column A and Column B the sales of differnt products are listed. A product can appear several times in Column A because each sale of the product is displayed.
In Column C the different products are sorted from A-C.
In Column D I want to use a VLOOKUP to get the sales from Column B for each of the products.
=VLOOKUP(C1,$A$1:$B$8,2)
However, since the products appear several times in Column A the VLOOKUP gives me only back one of the values.
How do I have to change the VLOOKUP to get each sale of the same product?
You cannot get desired result single VLOOKUP formula.
Use this array formula:
=INDEX($B$1:$B$8,SMALL(IF($A$1:$A$8=C1,ROW($A$1:$A$8)-ROW(INDEX($A$1:$A$8,1,1))+1),COUNTIF($C$1:C1,C1)))
Paste it into D1 and press CTRL+SHIFT+ENTER to change it into array formula, then pull formula down.
Another approach:
Insert one empty row above the data, then put this formula in column D (you can hide this column if you want to):
=MATCH(D2;INDIRECT("$A"& 2 + IF(D2=D1;E1;0) & ":$A$9");0)+IF(D2=D1;E1;0)
And this formula in column E:
=INDEX($B$2:$B$9;E2)
MATCH works similar to VLOOKUP but instead of the actual value returns the index of the result. INDIRECT("$A"& 2 + IF(D2=D1;E1;0) & ":$A$9") alters the searchmatrix based on the previous index of the search value (e.g. the first "Product A" is found at index 1 therefore the second "Product A" only looks in A3:A9, the second "Product A" is at index 4 thus the third "Product A" looks in A6:A9).
The second formula just extracts the value based on the matrix in column B and the index in column D.

Excel - how to look in a dynamically changing range of multiple rows and columns and retrieve data

I have 2 excel files. 1 is a workfile in which I work, the other is the output of a database. See pic 1 for my database output (simplified).
What we see here:
The purchase order numer in column A
The row in the database in column B
The status of the row in the database in column C
The classification in column D, where W means a product we want to measure and P meaning delivery costs, administration costs etc (we don't want to measure this)
The number of items ordered and the number of items delivered in column E
The company name and product info in column F
Now, what I want, is something like this:
I want this table to be filled automatically based on the database output. It works for column B, but I'm stuck on column C, D and E.
What I want from you!
I need help with column C, D and E.
Number of rows: it needs to calculate the rows only with W in column D. So for item 4410027708 it has to be 2 (only 2 rows with W) and for item 4410027709 it should be 1.
Items ordered: it needs to add-up all the values that are directly to the right of the W in column D. So, for 4410027708, it needs to add up 3 and 5. It must ignore all the rows with P!
Items to be delivered: You may already guess this, but it needs to add up all the values in column E that are on the same row as column C with To be delivered, but only for the W rows (not the P versions). So, for item 4410027708 this should be
I suggest easy if ColumnA can be filled down first (including for the last entry) then assuming the database output sheet is called Sheet1, in:
C2: =COUNTIFS(Sheet1!A:A,A2,Sheet1!D:D,"W")
D2: =SUMIFS(Sheet1!E:E,Sheet1!A:A,A2,Sheet1!D:D,"W")
E2: =SUMIFS(Sheet1!E:E,Sheet1!A:A,A2,Sheet1!C:C,"To be delivered")
copied down to suit.

Resources