Excel VLookUp But Only Once - excel

I have an Excel spreadsheet with one tab of our inventory of cars showing their make, model and serial number. I also have another tab showing our customer orders for cars but they only contain make and model. I want to match the custom orders to the inventory but I need them to only match once per serial number.
For instance, I have three customers wanting Honda Civics. I only have one on hand. Currently, VLookUp will match each customer to the same one so it appears as if I can fulfill all three orders; which of course I can't. I only have one.
I believe I am going to need something more flexible than VLookUp.
I am hoping that I can find a formula smart enough to match orders to inventory only once, then to ignore that match when moving onto the next order. This way I know exactly how many I can actually fulfill.

Here's an array-formula requiring the following structure:
Make & Model are combined into a single cell for both customer requests and your stock.
Your stock has named ranges for its 2 columns: MakeModel and Serial. The ranges can include headings, but they MUST both start in row 1.
Your customer requests start in A2.
Enter this array-formula in B2 only:
=IFERROR(INDEX(Serial,SMALL(IF(MakeModel=A2,ROW(MakeModel)),COUNTIF($A$2:A2,A2))),"Insufficient Stock")
To enter an array-formula, you need to press CTRL+SHIFT+ENTER. After entering the array formula, then fill it down.

Related

Excel : Copy muitple columns to rows based on one column

I'm looking for the most efficient approach to transferring information from three columns to one row, right next to each other depending on the company name.
Consider the following example:
I have a 226k data list with product details for several customers (around 30-40k).
One customer can have 2 to 50 products, each with a serial number and a product number. Check out the source data pic.
Output required: One row per customer will have all the product data, serial number, and product number next to each other.
Source data
desired output
I have never used Macro. Can someone please help me find the best way to deal with this issue?
This one is pretty tricky, you'll need to play with column numbers to adjust formula:
The customer list in column F must be typed manually or if you have Excel 365 you may benefit from UNIQUE Function. I did it manually.
My formula in cell G2 is an array formula (must be entered pressing SHIFT+CTRL+ENTER or it won't work!
=IFERROR(INDEX(SI($D$2:$D$14=$F2;CHOOSE(COLUMN()-6-INTEGER((COLUMN()-7)/3)*3;$A$2:$A$14;$B$2:$B$14;$C$2:$C$14);"");MATCH($F2;$D$2:$D$14;0)+INTEGER((COLUMN()-7)/3));"")
Drag to right and then drag to down.
My formula uses the value 6 and 7 because my data starts at column G, that means column number 7. So if you put this somewhere else, make sure you change also 7 and 6 values to the proper values!
Anyways, I've uploaded a sample to Gdrive in case you want to check the formulas by yourself.
https://docs.google.com/spreadsheets/d/1TvNUVt0ArzyFK_jsRtZfX1ja2zUgSdhR/edit?usp=sharing&ouid=114417674018837700466&rtpof=true&sd=true

New to excel, I wanted to ask if its possible to collect specific data from a table based on one input

Here is my question. I have two sheets. one contains receipts of purchases on each page horizontally. The other contains parts of those receipts that are necessary for arranging product delivery.
For example. the receipts would have mattress name, size, price, amount, tax, total, paid, unpaid, location, customer name, phone number, all row names, all column names, and receipt number. On my other sheet, i want to be able to Make it so that it would take these values in that order and put them in a row:
Mattress name, Size, Amount, Customer name, Phone number, Location, Unpaid, and receipt number.
I want to somehow automate that so that when i put in like the receipt number it will get everything needed from that receipt and put it in said columns in that row. Is there any way to do that?
I basically want to be able to enter a receipt number and have some code filter out the info i need and put it in specific cells in this other sheet. The receipt would have images and colors and distinguishing features, but i want the delivery sheet to be formal organized and only has necessary information for deliver.
I have no experience with VDA code for excel, and only minimal experience with normal formulas. Any help would be much appreciated.
Thank you for your time.
Sample Data:
Receipt:
Numbers represent order in Delivery (Subject to change if it makes it easier)
Delivery:
Shows the delivery data table and what it looks like. I can change this and reorder this however I want but I still need all information In there for delivery. If changing the order makes it somehow easier then I can do that.
This can be done with a lookup formula, for example Vlookup or Index/Match.
To use Vlookup, the receipt number must be the first column of the receipts table, e.g. in the sheet Receipts Table, column A.
Then on the delivery sheet, you can enter a receipt number into a cell, say A1, and use this formula in another cell:
=vlookup($A$1,'Receipts Table'!$A:$Z,4,false)
The 4 in the formula means "return the value from the 4th column", and the count starts with the first column in the lookup range. In this formula, the lookup range is all columns from A to Z, so the 4th column will be D. If you want to return the value from column E, use 5, etc.

Excel: How to lookup a value that has multiple search criterias?

I'm looking to implement a formula that would return the total quantity attributed to a certain ID. I was relying on a classic IfError and Vlookup combo to get the data, but I have many suppliers that use the same vendor code (supposedly unique ID) for different branches working on different commodities (which act as separate entities from a logistics perspective).
I have to manually split up the quantity attributed to certain suppliers by looking for the logistics agent responsible for them, and when the same log agent handles multiple commodities for the same supplier, I manually dig for the material codes.
I would like to know how to synthesize the manual process I undertake in a single formula.
I was using this formula to get the data in a pivot table =IFERROR(VLOOKUP(TRIM(A2),Pivot!$A$4:$B$105,2,0),0)
And I need to incorporate three search criteria to get the qty of a specific supplier's sub-entities (Vendor ID, name of Log Agent, Material ID).
[Part of pivot table where I'd get data pasted as value ][1]
[Example of how the data is stored and result I get with Vlookup function][2]
[1]: https://i.stack.imgur.com/A1v0f.png
[2]: https://i.stack.imgur.com/BmFi3.png
With the following solution, you will need to fill all the cells with vendor id and PURCH_GRP_NAME. If the range is built from a pivot table, there is an option to "repeat" the identical values on every row.
Once this is done, you can use a formula like this (the XXXXXX is the search criterion. I did not understand where this is supposed to come from):
=INDEX($D$1:$D$105,MATCH(XXXXXX,$A$1:$A$105&$B$1:$B$105&$C$1:$C$105,0))
Press Ctrl+Shift+Enter to turn it into a matrix formula.

HYPERLINK with variable (column name or cell) containing the carrier's Tracking Number

My spreadsheet now contains FedEx, UPS and a regional carrier. For approximately, five shipments and three or so purchases per day, I hyperlink these tracking numbers myself each day.
Is there a way to us either my column called "TRACKING" OR the cell in the column for each row to create the unique hyperlink for each row?
I can create two extra columns to do this because I don't know how to use the IF function to make a decision between if it is UPS (1Z...) versus FedEx (always numbers).
The manual hyperlinks I am using are:
http://wwwapps.ups.com/ietracking/tracking.cgi?tracknum=
https://www.fedex.com/insight/findit/nrp.jsp?tracknumbers=
And of course I have a column with the tracking number shown (happens to be column I). All info regarding each transaction is fully contained in the row. Only one transaction per row.
I think I see what you're asking.
Say your column I has the UPS/FedEx numbers. Put this formula in B1 and drag down:
=IF(LEFT($I1,2)="1Z",HYPERLINK("http://wwwapps.ups.com/ietracking/tracking.cgi?tracknum="&$I1,"UPS Link"),HYPERLINK("https://www.fedex.com/insight/findit/nrp.jsp?tracknumbers="&$I1,"FedEx Link"))
The way the If statement works is this: It looks in your cell I1 (again, assuming your tracking numbers are there), and looks at the left most two characters. If they're "1Z", then it uses the hyperlink() function to create the link to UPS, otherwise it uses the FedEx URL.

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