I have a list of product codes and product SKUs and need to find partial matches. The problem is all the data is out of order.
I have provided a subset of data done manually
Master SKU Product Code Corresponding Product SKU
1_100049 1000510 1_1000510
1_1000510 1000511 1_1000511
1_1000511 100052 4_100052
1_100052 1000525 N/A
1_100053 100053 2_100053
1_100054 100054 1_100054
1_1000560 1000540 N/A
1_1000570 100055 N/A
1_1000575 1000560 1_1000560
1_100060 1000570 1_1000570
1_1000600 1000575 6_1000575
1_100061 100060 3_100060
1_1000620 1000600 1_1000600
I need to find the Product SKU corresponding to the product code. Is there anyway to just list the match in column C? (The data is just in in two columns A and B)
The formula I have is
=VLOOKUP(A2,B$2:B$6000,3,"TRUE")
You can use INDEX/MATCH on a modified Master-SKU column with an array formula
=INDEX(A2:A10,MATCH(B2,RIGHT(A2:A10,LEN(B2)),0))
Use Ctrl-Shift-Enter when you insert the formula. If your columns contain numbers instead of text, you might have to add VALUE
=INDEX(A2:A10,MATCH(B2,VALUE(RIGHT(A2:A10,LEN(B2))),0))
This VLOOKUP may work for you. Adjust the lookup range to your data:
=VLOOKUP(RIGHT(A2,LEN(A2)-2),$B$2:$B$2,1,0)
Related
I have an Excel spreadsheet with 3 columns. I would like to lookup for a value that can be in the first 2 and then get the corresponding value from the third one.
A B C
Mustang Empty Ford
Camaro Corvette Chevrolet
The VLOOKUP can only search in the first column. What I need is to be able to find a value in column A and B and return the value from C.
=VLOOKUP("Corvette",A1:C2,3,0) returns #N/A (would like to return Chevrolet)
=VLOOKUP("Camaro",A1:C2,3,0) returns Chevrolet
Is it possible?
use AGGREGATE:
=INDEX(C:C,AGGREGATE(15,7,ROW($A$1:$C$2)/($A$1:$C$2=E1),1))
If it is only three columns then this will be quicker:
=INDEX(C:C,IFERROR(IFERROR(MATCH(E1,A:A,0),MATCH(E1,B:B,0)),MATCH(E1,C:C,0)))
But as you can see adding an IFERROR for each column can get out of hand with more columns
Both the above will return the first encountered of the lookup. If the data set is unique, no duplicates in any of the columns the we can use the following.
this uses FILTER which is currently available on Office 365 for Insiders:
=FILTER(C:C,(A:A=E1)+(B:B=E1)+(C:C=E1))
But it does require that the data set be totally filled with unique. If one want to return all that match we can use TEXTJOIN to create a comma separated list:
=TEXTJOIN(",",TRUE,UNIQUE(FILTER(C:C,(A:A=E1)+(B:B=E1)+(C:C=E1))))
You can also try this:
=IFERROR(VLOOKUP(F2,$A$2:$C$3,3,0),VLOOKUP(F2,$B$2:$C$3,2,0))
where F2 is the look up item, and $A$2:$C$3 is the range of your 3 columns.
The logic is to use two VLOOKUP to return the value from the 3rd column if the look up value is in Column A, or return the value from the 2nd column if the look up value is in Column B.
Cheers :)
I like index-match a bit more for this:
=if(Isnumber(match(Thing, FirstColumn,0)),Index(ThirdColumn, Match(Thing, FirstColumn,0)),Index(ThirdColumn,Match(Thing, SecondColumn,0)))
Basically, test for existence in the first column. If its there, keep going, otherwise, use the second column.
I have a list of SKU's from left to right columns B - X and 400 rows, not all of the cells are populated so there are plenty of blank cells.
I then have the product name in column Y (as there can be multiple colour variants and SKUs for 1 product).
On a separate tab I have all the order line details, which includes SKU, I need to append the product name on to the end of this using the first tab.
I have tried Index/Matching but it doesnt seem to be working, vlookup doesnt as I need to bring back the same column (Y) irrelevant of where it finds the match.
=INDEX('All Lines'!Y3:Y428,match(*Product SKU*,'All Lines'!B3:X428,0))
All lines is my first tab, with the product SKU coming from the tab with the order details
Expectation is the product name will be output (which is in column Y)
At first I misinterpreted your question I think. Are you looking for a certain value that can be anywhere in the matrix B3:X428 and return the row to the INDEX() row parameter?
In that case you could try to incorporate SUMPRODUCT() within the INDEX() row parameter like so (simplified):
The formula in G2:
=INDEX(D2:D9,SUMPRODUCT((A2:C9=G1)*ROW(A2:C9))-1)
I have been generating invoices by manually inputing the information for each product.
What I would like to do is type in a unique product code (E.g., "01-A") and in the same row automatically return the color, size, price, etc. ("properties") of the product.
I have a separate "database" sheet with these data and the product code in the same column.
I have attached a graphical example illustrating this idea.
Thank you very much for your assistance!
You need a lookup - in this case a VLOOKUP.
=VLOOKUP(Value you want to look up, range where you want to lookup the value, the column number in the range containing the return value, Exact Match or Approximate Match – indicated as 0/FALSE or 1/TRUE).
For example:
=VLOOKUP(B5, Sheet2!$C$2:$G$50, 2, FALSE)
Where B5 is the product code you enter, Sheet2!$C$2:$G$50 is the table with the product details on the other sheet, 2 means the second column (i.e. size), and FALSE to say only lookup if there is a match.
See the Microsoft reference.
Assuming your Sheet1 is as follows
Then, in Cell B5 of Sheet2 enter the following formula
=IFERROR(VLOOKUP($A5, Sheet1!$A$5:$D$7, COLUMN(B$1)-COLUMN($A$1)+1, FALSE),"")
Drag/Copy this formula down and across (to right) as required. See image for reference.
I'm trying to compare values across two columns (Product and Location) in Excel to highlight duplicates, but I can't figure out the logical test. I'm looking for rows that match three criteria:
Product value is duplicate
Product value is not blank
Duplicate 'Product' values occur with different 'Location' values
(Products with the same value in the same location are assumed to be distinct for a value I don't have, but products with the same name at different locations may be duplicate).
Edit: I want the formula to evaluate to true only if the same Product occurs in more than one Location.
I can figure out the first two conditions by themselves, but can't figure out how to incorporate the third. I've sorted the table so that the duplicate values should appear next to each other, but there are too many to check by eye.
I'm currently using this logical test for conditional formatting using the first two criteria. 'Product' occurs in column C, 'Location' occurs in column I.
=AND(C1<>"",COUNTIF($C:$C,C1)>1)
Given your criteria, I think what you need would be the CountIfs function for the 3rd criteria....
Your final formula would look as follows:
=AND($C1<>"",COUNTIF($C:$C,$C1)>1, COUNTIFS($C:$C,$C1,$I:$I,"<>" & $I1)>0)
In effect, your third criteria is saying Count if the product matches C1 AND the Location does NOT equal I1
Hope that does the trick!
NOTE:
The more I think about it, the more I'm pretty sure you do not need your second criteria... I've been trying to think of an example where your second criteria would affect the result of this final outcome, but can't find one....
Just something to consider....
It might be overkill, but how comfortable are you with PivotTables?
Insert a pivot table, and put the "Product" in the row, with the data as the "count" of Location.
Then add a column with a formula similar to:
=GETPIVOTDATA("Location", <top left cell of pivottable> ,"Product", <cell that has product you want a count of>)
The "Location" and "Product" text would have to match your column titles.
The easiest way to get the forumla right is to type "=" in the cell you want to have the value in, and then click on the pivot table cell that contains the value. You then replace the static text, with the cell that has the value you want to look up.
This is a confusing request.
I have an excel tab with a lot of data, for now I'll focus on 3 points of that data.
Team
Quarter
Task Name
In one tab I have a long list of this data displaying all the tasks for all the teams and what Quarter they will be on.
I WANT to load another tab, and take that data (from the original tab) and insert it into a non-list format. So I would have Quarters 1,2,3,4 as columns going across the screen, and Team Groups going down. I want each "task" that is labeled as Q1 to know to list in the Q1 section of that Teams "Block"
So something like this: "If Column A=TeamA,AND Quarter=Q1, then insert Task Name ... here."
Basically, if the formula = true, I want to print a list of those items within that team section of the excel document.
I'd like to be able to add/move things around at the data level, and have things automatically shift in the Display tab. I honestly have no idea where to start.
If there is never a possibility that there could be more that 1 task for a given team and quarter, then you can use a formula solution.
Given a data setup like this (in a sheet named 'Sheet1'):
And expected results like this (in a different sheet):
The formula in cell B2 and copied over and down is:
=IFERROR(INDEX(Sheet1!$C$2:$C$7,MATCH(1,INDEX((Sheet1!$A$2:$A$7=$A2)*(Sheet1!$B$2:$B$7=B$1),),0)),"")
I came across this situation. When I have to insert the values into a table from an Excel sheet I need all information in 1 Column instead of 2 multiple rows. In Excel my Data looks like:
ProductID----OrderID
9353510---- 1212259
9650934---- 1381676
9572474---- 1381677
9632365---- 1374217
9353182---- 1212260
9353182---- 1219361
9353182---- 1212815
9353513---- 1130308
9353320---- 1130288
9360957---- 1187479
9353077---- 1104558
9353077---- 1130926
9353124---- 1300853
I wanted single row for each product in shape of
(ProductID,'OrdersIDn1,OrderIDn2,.....')
For quick solution I fix it with a third column ColumnC to number the Sale of Product
=IF(A2<>A1,1,IF(A2=A1,C1+1,1))
and fourth Column D as a placeholder to concatenate with previous row value of same product:
=IF(A2=A1,D1+","&TEXT(B2,"########"),TEXT(B2,"########"))
Then Column E is the final column I required to hide/blank out duplicate row values and keep only the correct one:
=IF(A2<>A3,"("&A2&",'"&D2&"'),","")
Final Output required is only from Column E
ProductID Order Id Sno PlaceHolder Required Column
9353510 1212259 1 1212259 (9353510,'1212259'),
9650934 1381676 1 1381676 (9650934,'1381676'),
9572474 1381677 1 1381677 (9572474,'1381677'),
9632365 1374217 1 1374217 (9632365,'1374217'),
9353182 1212260 1 1212260
9353182 1219361 2 1212260,1219361
9353182 1212815 3 1212260,1219361,1212815 (9353182,'1212260,1219361,1212815'),
9353513 1130308 1 1130308 (9353513,'1130308'),
9353320 1130288 1 1130288 (9353320,'1130288'),
9360957 1187479 1 1187479 (9360957,'1187479'),
9353077 1104558 1 1104558
9353077 1130926 2 1104558,1130926 (9353077,'1104558,1130926')
You will notice that final values are only with the Maximum Number of ProductSno which I need to avoid duplication ..
In Your case Product could be Team and Order could be Quarter and Output could be
(Team,Q1,Q2,....),
Based on my understanding of your summary above, you want to put non-numerical data into a grid of teams and quarters.
The offset worksheet function will work well for this in conjunction with the match or vlookup functions. I have often done this task by doing the following steps.
In my data table, I have to concatenate the Team and quarter columns so I have a unique lookup value at the leftmost column of your table (Note: you can eventually hide this for ease of reading).
Note: You will want to name the input range for best formula management. Ideally use an Excel Table (2007 or greater) or create a dynamically named range with the offset and CountA functions working together (http://tinyurl.com/yfhfsal)
First, VLOOKUP arguments are VLOOKUP(Lookup_Value,Table_Array,Col_Index_num,[Range Lookup]) See http://tinyurl.com/22t64x7
In the first cell of your output area you would have a VLOOKUP formula that would look like this
=Vlookup(TeamName&Quarter,Input_List,Column#_Where_Tasks_Are,False)
The Lookup value should be referencing cells where you have the team names and quarter names listed down the sides and across the top. The input list is from the sheet you have the data stored. The number three represents the column number the tasks are listed in your source data, and the False tells the function it will only use an exact match in your putput.