Trying to sumproduct parts to their final assembly in Excel - excel-formula

I have two tables (will be dynamic data) that I was looking to reference for output on a third table, image of all three below:
Updated Image with example of output I am lookign for
The first table shows a forecast of unit sales of Final Products A-I (y axis) broken out by expected month that they will need to be assembled (x Axis).
The second table would be a 2-D array indicating what sub-parts are needed to build the final products in the first table. Sub parts on the x axis and Final Product on the y axis. (example: Final Product A needs 10 parts of sub part A and 5 parts of sub part B etc.)
I would like to find a way to sum the total sub-parts needed by month to build the forecasted Final Products in a third table (sub parts on the y axis and month required on the x axis). I have tried to use SUMPRODUCT methods but am unable to figure out a realistic solution. Any help would be appreciated.

Try this formula in cell B17:
=SUMPRODUCT(OFFSET($B$4,,MATCH(B$16,$B$3:$M$3,0)-1,COUNTIF($O:$O,"Final*"),)*OFFSET($P$4,,MATCH($A17,$P$3:$Q$3,0)-1,COUNTIF($O:$O,"Final*"),))
Maybe the countif($O:$O,"Final*") part can be replaced by 9, but if you get more different Final Parts it will grow along.
You can drag the formula to the other cells.

Related

Label X of Y counting formula

I am struggling from some time now to create a formula in excel and also in gsheets... for a major problem:
we have orders from a online marketplace
in one order define by ORDER ID... we can have maybe one product... sometimes multiple products...
...this is how export orders look like:
i need to create count for printing labels for each order... based on qty and also number of products... 1 of 5, 2 of 5, 3 of 5... so on... to verify all the products for entire order (same ID)...
those count labels are based on total qty and total no of products.... in one order...
is a similar thing for AWB delivery/expedition for courier.... multiple destination, multiple/different numbers of boxes for each destinations...
can u help us with a formula or a way to create those counting labels?

In Excel: How to built a graph with time as X, names as Y with multiples series?

I am looking for a way to make a specific graph in Excel and I can't find a solution in Excel or on the web.
I have data about an online training with people completing parts of a course at a certain time:
FullName
Course
TIME
Name-A
Part 1
23/03/2022 10:38
Name-A
Part 2
23/03/2022 12:07
Name-A
Part 3
23/03/2022 16:55
Name-B
Part 1
11/03/2022 15:14
Name-B
Part 2
22/03/2022 12:08
Name-B
Part 3
28/03/2022 16:06
Name-B
Part 4
30/03/2022 14:55
Name-B
Part 5
18/04/2022 08:13
Name-C
Part 1
11/04/2022 15:25
Name-C
Part 2
20/04/2022 13:50
I would like to have a specific graph of this data:
On the vertical axis: one row for each user' name: Name-A, Name-B and Name-C.
On the horizontal axis: continuous time (say, in days) From the minimum time in the table (or less) to the maximum (or more)
Series of plots for the data: Each part of the course (from Part 1 to Part 5 here) would be a series of dots of a specific color, placed on the right row (for a learner's name) above the corresponding time on the horizontal axis.
Do you have any idea on how it could be achieved?
All the best, R.S.
Edit: The table does not appear as in the preview so i try to add a screenshot:
Screenshot of the table
So one way to visualise this as mentioned in the comments is to create a separate series for each person and show passing each part of the course as a vertical step:
It's based very loosely on this but I've set each day in the date range as the x-coordinates and used a lookup to transform the data in H2
=RIGHT(XLOOKUP($G2+TIME(23,59,59),FILTER($C$2:$C$11,$A$2:$A$11=H$1),FILTER($B$2:$B$11,$A$2:$A$11=H$1),0,-1))+(COLUMN()-COLUMN($G$1))*10
pulled down and across to give
Explanation
The data for the graph has dates spanning the times in the raw data for its x-coordinates (column G). I generated it manually but could have used Sequence in Excel 365.
There are three columns of y-values, H to J, generating a separate series for each person. The three lines are initially spaced out by 10 units based on the column number. In the formula above, the raw data is filtered by the person's name so the headers in columns H, I or J match the names in column A in the raw data. Xlookup is used with 'next smallest' match so where the date in column G is greater or equal to the date/time in column C it will return the corresponding course from column B. Because column C actually contains date/times, I have added almost 24 hours when matching the date in column G to make sure that a match is found if the day is the same, regardless of time. In a case like Name-A, where three courses are completed in the same day, this will automatically select the last one (Part 3). Then I take the right-hand character of the course name (which is a digit in the sample data) and add it to the relative column number multiplied by 10. If there is no match, Xlookup returns zero so you just get the initial value for each series (10, 20 or 30), otherwise the result will be an increase by one unit each time a course is passed. If you couldn't assume the last character of the course name was a digit, you would need a lookup to assign a number to each course name.
The data is then plotted on a scatter graph with points joined by straight lines. I had to adjust the x-axis manually to make the range correct and the labelling clearer.
This could be done without Excel 365, probably using Aggregate to get the highest row number with a condition on the name and date.
EDIT
I could have achieved the same result much more easily using Countifs to find how many courses had been passed by a certain person by a certain date:
=COUNTIFS($A$2:$A$11,H$1,$C$2:$C$11,"<="&$G2+TIME(23,59,59))+(COLUMN()-COLUMN($G$1))*10
This wouldn't have needed Excel 365. If you needed to give different courses different weightings, you could do this with a sumproduct and a lookup, also fairly straightforward.

Excel lookup based on multiple criterias

I have the following problem: need to lookup for data based on 3 criteria:
Product type - Exact match
Product Height - loose values in ranges
Product Width - same as above.
I have a multiple tables like D3:I8 with cost of used components based on maximum product width&height for that range. in example 0 emerge on the intersection it means that product cant be constucted (width, height or both too large). we can make 2250mm x 700mm but 2250 x 1000 is impossible to make since 0. Those are only example datas in reality those numbers for width and height are diffrent.
Please can someone guide me through this problem?
(picture is worth more than a thousand words)
Assuming that the tables are always 6 rows x 6 columns, you can use Let() in 365 or just Offset in older versions.
Using Office 365 with the new Let() Function
=LET(myTable,INDEX(D:D,MATCH(L5,B:B,0)):INDEX(I:I,MATCH(L5,B:B,0)+6),INDEX(myTable,MATCH(M5,OFFSET(myTable,0,0,6,1),1),MATCH(N5,OFFSET(myTable,0,0,1,6),1)))
Or, if you don't have the Let() function, use this ugly compilation of Offset repeats:
=INDEX(OFFSET(INDEX(B:B,MATCH(L5,B:B,0)),0,2,6,6),MATCH(M5,OFFSET(INDEX(B:B,MATCH(L5,B:B,0)),0,2,6,1),1),MATCH(N5,OFFSET(INDEX(B:B,MATCH(L5,B:B,0)),0,2,1,6),1))
Edit: if the tables all have different shapes, then you may want to take the trouble of selecting each table and assigning them range names with the name manager, like "Type1", "Type2" etc. In the screenshot below I have the following range names:
Type1 ='Sheet1 (2)'!$D$3:$I$8
Type2 ='Sheet1 (2)'!$D$10:$G$18
Type3 ='Sheet1 (2)'!$D$20:$L$26
With these range names in place, you can use this formula:
=INDEX(INDIRECT("Type"&L5),MATCH(M5,OFFSET(INDIRECT("Type"&L5),0,0,ROWS(INDIRECT("Type"&L5)),1),1),MATCH(N5,OFFSET(INDIRECT("Type"&L5),0,0,1,COLUMNS(INDIRECT("Type"&L5))),1))

Use particular formula based on referenced value

I am working on creating a price list that uses calculated values to determine the price based on cost of good sold, area, and a few other things for some items.
There are different formulas used depending on the item type.
For example, prints would be calculated with an AREA multiplier type using the equation [#Multiplier]*[#Area] (referencing formatted table values, but they could also be typical references (f2*g2 for example)
So my question is, how could I set it so that a lookup of the multiplier type will reference a table that has the formula needed for that calculation.
I figured something like vlookup, but that either displays the equation itself, not the result, or doesnt work at all.
Currently, I have a big IF statement that works, but is a pain if I want to change the formula.
=MROUND(IF([#Mtype]='Multipliers 2'!$V$4,'Multipliers2'!W4,IF([#Mtype]='Multipliers 2'!$V$3,[#Multiplier]*[#Area]+40,IF([#Mtype]='Multipliers 2'!$V$5,2*[#[Cost of Goods]]+[#Multiplier], IF([#Mtype]='Multipliers 2'!$V$6,[#Area]*[#[Cost of Goods]]*[#Multiplier],[#Multiplier])))),0.5)
To Clarify, each product will have a multiplier type, along with data associated with the product that will be used for calculations:
So if I mark a product to use calculation A, the program should go look in a formula table, figure out what Calculation A is and then use those values to determine the result. If Calculation A = (Multiplier + 2*cost of goods sold), then it will look up the value in the multiplier column and add it to 2 x COGS.
Calculation B may be Multiplier * COGS and so on.
A problem I had last time I tried this a while ago was that even if I were to get the value to return some sort of result, I couldn't get the reference to change properly to correspond to the required row.
The data above is a small sample of what I'd be doing. Each product is part of a product type which has multiple variations in size, etc. So each product would reference a multiplier table which is used to calculate the final price, so if I want to change the prices for the entire group, all I'd have to do is change the value in the multiplier table, or the equation, and every corresponding product adjust accordingly.
The mtype would be controlled by the multiplier table. So I would like to set it so that if a particular mtype is used, the final calculation in the Price column will be determined by the formula listed.

Picking top 5 scores from a range

I run a small golf eclectic with excel. One of the things we have is a points system. I would like to get the 5 highest points scored over the season and have them ranked from 1 (being the highest points scored) to 5.
My knowledge of excel "sums" goes only a wee bit further than add and subtract.
Thanks!
If you don't want to change the order that they are presently in you can use the LARGE function. It returns the kth largest value.
Below is a great formula, if you drag it down it will automatically get the second, third and nth largest value from a table of data (in this example the data is between A1 to A10).
=LARGE(A1:A10,ROW(A1)-ROW($A$1)+1)
You can then match the values with names or corresponding data from the tables using the MATCH and INDEX functions. The example below would fetch the name for each value from the second column.
=INDEX($A$1:$B$10,MATCH(cell reference with score or value,$A$1:$B$10,2))
Play around with these formulas, they are very convenient for data m
If you have a column containing the scores, you could add a filter (Data->Filter I think) and sort descending.
Though, if you just have rows that are something like [Date][Person][Score] you'll need to go to another sheet and SUM the scores for each person then sort that... Unfortunately my Excel skills aren't up to par to pull a score for each person like that.
Given a list of numbers in A1 to A10, you can work out their 'Rank' relative to each other by using 'RANK'.
e.g.
RANK(A1,A1:A6,0)
RANK(cell, list of cells to check against, order)
For order, 0 = descending.
From there you can work out which one is first pragmatically.
If you have Excel 2007,
Check that your data is continuous, with no blank rows or columns. Click on your scores and then select 'Data - Filter'
Using the dropdown that the filter creates at the top of your scores column and select 'Number filters - Top ten'
A 'Top ten Autofilter' dialog will be displayed, reduce the show 10 to 5 and then click on OK.
For earlier versions of Excel add a RANK formula in a new column. Be careful as the scores need to be sorted, usually into descending order. If there are any ties, they will be given the same ranking number and the subsequent rank number will be incremented by the number of ties. (E.g. If there are two scores of 2, ranked as 5. The next score will be ranked as 7, not 6)
If you want to use the LARGE Function as described above, make sure you put the same range in the list for each of the LARGE functions. That is, change =LARGE(A1:A10,ROW(A1)-ROW($A$1)+1) to =LARGE(A$1:A$10,ROW(A1)-ROW($A$1)+1) or you will get some strange incorrect results

Resources