Multiple column VLOOKUP - excel-formula

I have a spreadsheet that lists all of the wines in my cellar with separate columns for the Location (1-30) and Bin (A-V) and barcode for each bottle. I want to add a sheet that creates a map of the wines with the barcode for the cell value. I could use VLOOKUP to find the location but that won't let me look up the second value. Is there a function that allows

Related

How pass dynamic value to a INDEX function in Excel?

I want to write a dynamic excel condition to fetch some values based on the cell Contents.
My excel sheet contain 3 tabs. Home, tab_1 and tab_2 respectively. In the home tab, I have some text contents for selecting sheet and table.
In the tab_1 sheet, i have tables named as Table_1, Table_2,Table_3 and Table_4.
Now I want to get some elements from the table based on the text values.
Example: if the sheet name = Tab_1 and Table name = Table_1 then i will take the 2nd index values from Table_1 array in Tab_1 sheet.
My plan is to do dynamically using excel formula.
So i have tried to write the below logic to get 2nd index values.
INDEX(INDIRECT("'"&$B$2& "'!B1:F1"),2)
here it will take $B2 as Tab_1 . I am passing table value as "B1:F1".
Now i don't know how to get the matching array (instead of B1:F1) with the cell $B3 in the home sheet (Table_1).
Any suggestion or help ?
Finally after some research, I found the solution. We can use MATCH function to check the exact row name.
INDIRECT("'"&$B$2&"'!A1:F4)
This will search in the next tab (cell B2 text name ie: Tab_1 and table from A1 to F4 cells)
MATCH($B2,INDIRECT("'"&$B$2&"'!A1:F4),0)
This will search the exact name (from cell B3 text ie: Table_1) from the tab
So All together you can write below function:
INDEX(INDIRECT("'"&$B$2&"'!A1:F4),MATCH($B3,INDIRECT("'"&$B$2&"'!A1:F4),0),2)
I hope this solution will help you someone who facing for this kind of problems.

Excel: Convert Column of Duplicates into a New List, AND THEN create into a DROPDOWN LIST

I have a CSV Product Export from Shopify. I am creating a manual offline quote sheet for furniture items.
Column B = Product Title
Column A = Product Title's Handle (obtained using an Index formula)
PROBLEM:
Column D = Duplicates need to be converted into a list.
THEN using above formula add to a new cell for a Drop Down list (Add formula into Data Validation:Source.)
Note based on the image diagram: Ref 'I2' is located far top left where it says 'Aurora Chair 4 Leg'
NOTES,
And this formula is enetered into 'I3',
=XLOOKUP(I2,A2:A16,D2:D16)
.. but, this formula only returns 'D2', not D2:D5
I also unsuccessfully tried,
=indirect(I2,A2:A16,D2:D16)
=XLOOKUP((I2,A2:A16,0)RANGE D2:D16))
=index(I2,A2:D16)
=FILTER(A2:D16,D2:D16=I3)
{=SUM(COUNTIF(A2:A16,D2:D16))}
=COUNTIF(A2:A16,VLOOKUP(I3,D2:D16,1,0))
You can use this formula for a unique list of filtered values:
=UNIQUE(FILTER(D2:D16,A2:A16=I2))
You can't use this formula as a data validation source :-(
Therefore you have to put it somewhere (hidden) on the sheet, e.g. into cell K2.
And then refer to it as K2# in the data validation source.
Edit according to comment:
To show the values in a row instead of column you use:
=TRANSPOSE(UNIQUE(FILTER(D2:D16,A2:A16=I2)))

Data validation (Drop down) to auto-populate column with formula

I'm trying to make an excel sheet a lot smaller and easier to handle. What i'm trying to do is have a drop down auto-populate a whole column.
My original sheet looks like:
Item Name(A1) Item Code(B1) Price1(C1) Price2(D1) Price3(E1) Price4(F1)
My goal is to look like:
Item Name(A1) Item Code(B1) Price Drop Down(C1)
I also want to be able to delete an item in Column A and still be able to have the correct values. My VLOOKUP only uses 1 column and wont change (of course) when I switch to a different price set.
You could try something like this:
Copy your original table to another sheet (sheet2), so you can use it as the lookup table. In the original sheet delete the last 4 columns (C:F). Next create a dropdownmenu in cell C1, with items {price1 ,price2 ,price3 ,price4}. Put the following formula in cell C2 and copy down.
=VLOOKUP(A2,Sheet2!A:F,RIGHT($C$1,1)+2,FALSE)
The last parameter [FALSE] is necessary when the item names in the lookuptable are not in alphabetical order.

Reference the current row in the INDIRECT function

I'm using the INDIRECT function to create a dropdown list in a cell. The contents of the list will depend on what is chosen in the previous column (same row).
e.g. if in Column A "Cuisine" I have three options in the list (Italian, Chinese, British), I want Column B "Dish" to reflect what was chosen in col A.
So if I chose "Italian" the list in col B will be "Pizza, Lasagne, Macaroni"
I've defined names on a separate sheet and I can get this all working by using the function INDIRECT($A$1) in the data validation command for the cell and using choose from a List.
However when I move to the next row, I want the same functionality. Is there way to reference the active row - something like INDIRECT ($A$ActiveCell.Row)??
Assuming cells in column A has a list of "Cuisine Types", for each of this "Cuisine Types" there is also a Defined Name containing the corresponding options for each "Cuisine Type". With a formula in Column B you want to retrieve the corresponding options for each "Cuisine Types".
Try this formula in cell B1 then copy till last record:
=INDIRECT( A1 )

Advanced Find And Replace In Excel

I have a product list excel sheet, and category list excel sheet.
In the category excel there is cat_id and cat_name one corresponds to the other.
I need to do a find and replace on every cat_id and replace the numbers in the product list with the cat_name.
How would I do this in excel?
I do not think you can achieve what you are looking for with just Excel formulas in one step. However, you could use the following approach.
Let's assume that the product list sheet is called ProductList and the other one is called CategoryList. Also, let's say that the cat_id items on sheet ProductList are in column A and the cat_id and cat_name columns on sheet CategoryList are in columns A and B.
First you have to make sure that the items on sheet CategoryList are sorted in ascending order on cat_id. Then, in a cell on the first line of an empty column on sheet ProductList (let's say that is cell Q1) , enter the following formula:
=LOOKUP($A1,CategoryList!A:A,CategoryList!B:B)
Then select cell Q1 and drag the lower right corner all the way down until the end of the data in your sheet. After this, column Q will contain the desired values.
To actually replace the original values in column A with those in Q, you need to copy whole column Q and do "Paste Special" into column A, where you select the radiobutton "Values". After that, you can delete the temporary column Q.
If you want to be robust with regard to cat_id items not present on sheet CategoryList, you could add a check, which makes the formula as follows (on one line):
=IF($A1<>LOOKUP($A1,CategoryList!A:A,CategoryList!A:A),
"Not Found",LOOKUP($A1,CategoryList!A:A,CategoryList!B:B))
The Powershell script extension PSExcel have some join feature:
PSExcel: https://github.com/RamblingCookieMonster/PSExcel
Method:
Join-Worksheet -Path
I have tried the search and replace with success.
Also refer to my answer here:
Perform find & replace in excel doc in C#

Resources