Production Calendar - Excel - excel

I always bite off more than I can chew when it comes to my Excel knowledge. I am hoping someone could help me with this.
Essentially, I have two sheets, first is "Schedule" which is a data dump from MYOB with what we have on order with the warehouse to produce.
I then go through and plan what needs to be made on what day over a two week period.
I'd then like this to be put in a user friendly calendar in "Plan".
I thought of doing a comcatenate to make the week and day unique, and used an IF And formula. Then i realised all I am doing is making it look for the first line.
Is there a way to do what I am asking in Excel?
I guess what I want the calendar to look up a category, EG DUCT, then place anything with Duct in the respective concatenated calendar line.
spreadsheet can be found here
http://www.castekauto.net/stack/PlanningSchedulestack.xlsx
TIA

After some changes to the planning table which include:
Filling column A with Week-Day
Unmerging the column headers (for Duct for example)
Standardizing the fields you need (Composite Hose changed to Hose for example to match the Schedule worksheet)
I used the following array formula (entered with Ctrl+Shift+Enter):
=IFERROR(INDEX(INDIRECT("Table3["&C$6&"]"),SMALL(IF((Table3[Helper]=PLAN!$A7)*(Table3[STOCK CATEGORY]=PLAN!C$5),ROW(Table3[ITEM CODE])-8),ROW(7:7)-MATCH("zzz",$B$1:$B7,1)+1)),"")
Sample workbook uploaded here.
A bit of mumbo jumbo if you want to understand the formula break down a bit:
IFERROR(Result, "") simply will show blank if the result is an error (there are no more items that can be displayed)
INDEX(Column Result,SMALL(Matches, N)) Here Column Result is where the result of what we need comes from. It can be Item Code, Description or Quantity. Matches is a list of index for the rows that matched some specific criteria (Type of material, whether it's in the same week and day) and N is the Nth result we need. If N is 1, then we get the first result of the matches, if N is 2, we get the 2nd.
From the above, I used INDIRECT("Table3["&C$6&"]") for the Column result to make the formula a bit more flexible. When it is like this, the formula will decide which column it needs to return, whether it's the Item Code, Description or Quantity.
Matches is defined by IF((Table3[Helper]=PLAN!$A7)*(Table3[STOCK CATEGORY]=PLAN!C$5),ROW(Table3[ITEM CODE])-8) which basically checks if the week and day matches, together with the Stock Category. If both matches, then return the row number of those rows (the result is an array).
N is defined by ROW(7:7)-MATCH("zzz",$B$1:$B7,1)+1), which is kind of a small algorithm I've used so that after each new day, I get a new N starting at 1, that increments by 1 until a new day is reached. It basically takes the current row, subtract the last row up to the current row from column B and add 1. If the two are on the same row, the result would be 1. If the current row is one row below the last row from column B, the result will be 2, etc.

Related

Excel "SMALL" "IF" another row is not blank

I try not to ask for help like this but this one is screwing my noodle.
I have a costing spread sheet that I have managed to manipulate to give me a monthly cost role up (if exists) VS part number. Part numbers column c, months row 3.
On another sheet I'm trying to list the part numbers next to the cost role up and relevant date (each part number may have multiple entries)
I just need to do a "SMALL" for the "date" row (Row 3) on my costing sheet "IF" the "correct part number row" (or a fresh MATCH/VLOOKUP for the part number) has data in it. Or some how have the small return the Column INDEX number. I could then use INDEX to return the correct date and value using SMALL and Column B (the number of costs per part number, so if there are 3 instances that column currently list 1,2,3 before starting the next part number)
So close..... but this last bit is a struggle. Its a shame SMALL cant return INDEX Column numbers.
Does anyone know how to get a "SMALL" to lookup a row (based on a column search criteria) and check if the column has data, if so include the that column header in the "SMALL"
Update...
Thanks for your comments. I've stripped out the problem into a separate sheet to make it a little clearer. (I'll upload if possible).
I've also completed the rest of the excel to show the whole process. In doing so I've discovered Headers are automatically converted to text and so added a column to work around this using "DATEVALUE".
The goal is to list the number of costs related to a part number so.... if 500111 has had a cost role up in 3 different months it will list them in the cost report. So.... part number, relevant column "date" from "Cost data" sheet and relevant cost (#that part number # that date). if I can get a list of dates from "Cost Data" columns and put them in Column D "Costing date (text)" next to the relevant part number i should be sorted. I've highlighted the column in red on the new screen shots.
Cost Report
Cost Data
lines highlighted in yellow just to show they are empty
Edit:
Almost there for anyone else trying this
=INDEX($B$5:$J$5,,SMALL(IF($B$6:$J$6>0,COLUMN($B$6:$J$6)),3))
I just need to figure out how to define a variable "ROW" within a SMALL(IF statement. I should then be able to reference the correct table row number (which I already have).
Anyone know how to put a variable ROW or COLUMN reference in a SMALL formula?
Did not understand the problem fully.
But like this you can have a variable Row in the small formula:
=SMALL($A$4:$A$10;ROWS($C$4:C4))

Google Sheets: Searching List for Most Recent Passed Value as Sum Increases

my family and I are doing a challenge to run the distance from one city where my siblings live to another. We have a google form set up in order to log our runs and distance, and then I put in a simple sum formula to show our current total progress. However, I would like to add in a feature on the spreadsheet to show our current location on the "run".
I was able to come up with a list of the cities we would pass through along with the distance to those cities, however I would like the sheet to update to indicate Current Location: "city" when we pass through one of them.
Ideally, this would mean I could input a formula that searches the list of cities (in a second sheet tab), and then identifies when the sum surpasses one of the listed distances, and then returns the names of that most recent surpassed city. I have a copy of the sheet below.
Copy of sheet (personal data removed)
I've tried something along the lines of =INDEX(G:G,MATCH("zzzz",G:G)) for inserting the cities manually as we pass them in column G, but I would need to be constantly updating the sheet on my own in that case. I would be putting the formula in H1 of the form tab.
Hoping this is possible, appreciate any help!
In H2:
=ArrayFormula(IF(B2:B="",,VLOOKUP(SUMIF(ROW(E2:E),"<="&ROW(E2:E),E2:E),{Cities!B:B,Cities!A:A},2,TRUE)))
The first IF test leaves the Col-H row blank if the corresponding row in Col E is blank.
SUMIF returns the sum up to the current row at each row in Col E.
VLOOKUP looks up each of those progressive sums within a virtual array of the data from your 'Cities' sheet in reversed order and returns the second virtual column (which turns out to be your city name). Because all values in Cities!B:B are in perfect ascending order, the final parameter of VLOOKUP can be set to TRUE, which will return the closest value before the searched value if an exact match is not found.
In your example, you can use index match cities and sum running sheet with fixed first row to achieve your outcome, here is my solution:
=index(Cities!A:B, match(sum($D$2:D2),Cities!B:B,1),1)

Multiple Responses in Excel's Reverse Lookup

I'm trying to make a schedule of available workers after they have given me their availability. I would like a list generated of all people who say they can work on a specific day.
Ideally I would create some kind of list that looks like this:
I'm actually trying to schedule volunteers for my swim team, not employees, but the idea is the same. The form that they are filling out can also have blank spots (not shown in data table above, but possible) and the dates in the first column will also be out of order. I can manually fix both of those things, but if there is a solution that does not require me to fill in the blanks or sort the dates that would be ideal. I'm using Excel 2019 on a Win10 PC.
Starting in I2 you would have
=IFERROR(INDEX($B$1:$G$1,AGGREGATE(15,6,COLUMN($B$2:$G$7)
/(INDEX($B$2:$G$7,MATCH(I$1,$A$2:$A$7,0),0)="yes"),ROWS($1:1))-COLUMN($A:$A)),"")
so you are finding the right row in B2:G7 by doing a match on the date in column A, then finding the first, second, third... column which has a Yes in it, and finally getting the matching name from the first row.
You can see what's happening by stepping through the formula with evaluate formula:
(1) find the right row in B2:G7 by index/match
It's matching the date (stored as a number, 43466) against the list of dates in column A. The matching position is 1, which gives the row, and the column parameter in the Index function is 0 so you get the whole row.
(2) Find which cells contain 'yes'
The values in the array which do contain yes will be replaced with true and the ones which don't will be set to false.
(3) Do the division
This is the crux of the whole thing. What aggregate is going to do is to ignore the #div/0 entries (because we used option 6) and work out the lowest (minimum) column which corresponds to a 'yes', which is 2. It's the lowest because rows($1:1) just works out to 1 so you get the 'first smallest'.
(4) Adjust the column so that you get it relative to the first column of B2:G7. You could just subtract 1, but I'm trying to make it so that it still works if you insert a column to the left of the range.
5) Then all that's left is to index into the list of names in B1:G1
ending up with Albert.
As the formula is pulled down, rows ($1:1) changes to rows ($1:2) etc. so you get the second smallest column with a yes in it and so you get the second name. Eventually it errors out when there are no more matching names so IFERROR comes into play and you get a blank cell.

Comparing dates in two columns with matching criteria

I'm trying to fill out a sheet with a somewhat complicated criteria, I have four columns I'm interested in, however the columns are mixed into a much larger table, sorry vlookup :(
There are two columns that contain an ID# and a Category, one column with date and time stamp, and one that MAY contain a date and time stamp. (Column1,2,3,4 respectively)
Column 3 is when an action took place, Column 4 is the next time that action with the same ID# and Category has to have been completed by.
Essentially I need a cell(s) that will check for a date in Column 4, if there is one, find the next value in Column 3 that is greater than that of column 3 in the row with the value in Column 4, AND has the same ID, AND Category and compare them to see if it was done on time, preferably also by how much if it was late.
I'm able to find it almost with:
{=MAX(IF([#[Column 2]]=[Column 2],[Column 4]))}
Entered as an array formula, however that will only give me the last time that Category was given a "Next Due Date" and similarly with Column 1 replaced for Column 2 in the code sample above, I only get the last time that ID# was given a "Next Due Date".
As some Event ID# can be around for many days, and can run concurrently with others there's no guarantee all IDs will be grouped, nor Categories within those IDs.
It appears any attempts to add an AND(.. function break the array, though I'm not positive I'm not just messing up the placement of it.
It's perfectly fine if the solution involves creating helper cells.
The table is sorted chronologically by column 3 with the latest date at the top if that's any help.
TYVM for even taking the time to read this :)
Edit 1:
Sample Data
I've included an image with some sample data, to clarify the awkward sentence above. The orange arrows are pointing to two dates that would be compared and the event was late. the Green points to a group that was on time.
the categories are
Those two are being compared because each set has the same category, and ID. I hope that clears it up :)
You could try this formula (goes into column E):
=IFERROR( IF($D2<>"", LOOKUP(2,1/($F1:$F$2=$F2),$C1:$C$2), ""), "")
Very important here are the $ signs, as the searched area is supposed to move with the row. (Note: this formula goes into E2. You then copy > pastespecial (only Formulas) it into the rest of the column.)
My table looks like this:
A B C D E F
ID Category Start-date Due-Date Completion-Date ID+Cat. (Helper column)
The formula in F is simply =$A2 & $B2. The data starts in Row 2.
You will need to replace the columns with yours.
Please let me know if this is what you were looking for.

Locate duplicate information between two spreadsheets

I run an open order report for a warehouse team every two days, and then go through the open orders; and email vendors to confirm their delivery date as pointed out by the report.
Naturally the reports are going to have some of the same information every other day, but there will be new orders, as well.
What I need to be able to do is figure out a way to tell the new spreadsheet to determine if any of the information in the new sheet was in the old sheet.
For example.
A, B, C, D, is Delivery Date, Part Number, Part Description, and Purchase Order Number - Respectively.
Information in spreadsheets in internal and confidential, otherwise I would post a photo of it, to help understand.
I want it to tell me if those items match between both spreadsheets, so that I don't suddenly end up asking twice about an order or have to go line by line to match up. Because that takes FOREVER.
Assuming the purchase orders are unique day to day, you can use the match function in a column on the new orders page to see if the same PO is on the old PO's tab. If you get a #N/A the values are unique. Otherwise, Match will return the row number of the matching value.
If you need to match on multiple values (e.g. Date, PO, Part#) then use the concatenate formula to create a multi-part key.
=Concatenate(Text(DateCell, "YYYYMMDD"),"_", PO,"_", Part#)
Then put the same formula on both sheets and do the match on your new key column.
If you want to test for equality across all items, you can do it easily with an array formula. Here is an example that compares 4 columns (similar to you) for exact matches. It multiples the combined result by ROW so that you can see where the last match occurs. It is the last one because MAX is used.
Hopefully you can see how this would be extended to your case. Note that this is an array formula (entered with CTRL+SHIFT+ENTER) in cell F2 copied down through the column.
Formula in cell F2
=MAX((A2=$H$2:$H$21)*(B2=$I$2:$I$21)*(C2=$J$2:$J$21)*(D2=$K$2:$K$21)*ROW($H$2:$H$21))
This formula works by building up a product of comparisons which is the same as an AND operation. This will be a 1 if the conditions are all true. That 1 is then multiplied by the ROW so that the match location is returned.
Picture with a couple matching rows colored and the ranges in color to see how the formula works.

Resources