Match and lookup to find price - excel

I would be grateful if someone could help with the following.
I have a workbook (called passenger car comparison) that has a column of postcodes (B1) and then columns for different prices (C1:I1).
In a separate workbook (called Search Tool), I would like to display the post codes from B1 as a dropdown list, with the same row also displaying the prices from C1:I1 for that particular post code.
Would I need to use INDEX and MATCH or HLOOKUP? Confused!
There is a link to the spreadsheet here if my explanation isn't clear!
Many thanks in advance!

You can actually use both.
However, you should use VLOOKUP instead of HLOOKUP, because your data elements are in rows, not columns. This is the most direct approach (=VLOOKUP(DropDown,WholeTableFromBtoI,Line,FALSE) - the FALSE here avoids linear interpolation with your postcodes). You can get your line from the row 1 of both cells, using MATCH, if you want to get fancy, by =MATCH(Category,FirstLineOfTable,0).
And, If you intend to use MATCH straightforwardly, your better approach would be using OFFSET as well, as in =OFFSET(FirstCellOfTable,MATCH(PostCode,PostCodeRow,0),MATCH(Category,FirstLineOfTable,0). It's a probably not the most intuitive approach, but it works as well.
Hope that helps.

Related

How can I multiply lookup values from two different tables and then sum them in just one cell?

I am trying to get a dedicated material table in excel. So we have a few products and these products require particular materials. I know how much and which materials go in particular products. I also know how much is sold in which year, now I want to calculate the required materials for these years. Because the productbase is large (>100), and thus >100 columns, I would like to use some lookup or index function to automate the multiplication.
As shown in the picture, I tried using a sumproduct, which was also explained in some other question on stackoverflow. This sumproduct should multiply all values obtained in one table with the corresponding values in the other. I feel that something is not right about my first two match functions (see picture again)
The code used:
=SUMPRODUCT(INDEX($B$19:$E$22;MATCH(B$2;$A$19:$A$22;0);MATCH(B$10;$B$18:$E$18;0));INDEX($B$3:$E$5;MATCH($A11;$A$3:$A$5;0);MATCH(TRUE;$B$3:$E$5>0;0)))
The image contains some extra info and explanation of the actual need
The reason that it needs a lookup or index is because the products in table 3 are always in another order than what is shown in table 1.
I would like to have this sumproduct as automated as possible, thank you in advance:)
You could try and adapt the below:
Formula in B11:
=SUM(INDEX($B:$B,MATCH($A11,$A$1:$A$5,0)):INDEX($E:$E,MATCH($A11,$A$1:$A$5,0))*TRANSPOSE(B$19:B$22))
Entered as array, CtrlShiftEnter
Drag right and down into matrix.
Side-note: Be sure to edit your question to include all relevant information, including your own atempted formula, as text. Way easier to copy paste sample data that has been formatted as markdown :)

Finding value with similar headers in multiple columns

I am trying to do an Offset/Match or Index/Match type formula to find the value that matches a cell. The problem is the way the sheet is laid out.
For an example I am trying to match the Job No. to the Project Name under the appropriate client.
I would like to keep it in this format because the project list will grow.
This sheet is where my lists are kept.
*This is just being created hence why the Project lists are tiny.
This sheet will be an ever expanding list of stuff that needs to be done.
You can see the OFFSET formula below that I tried. Is there another way of doing this or can this be done with a simple formula (instead of a long IF statement for each Client)?
=OFFSET(D2,MATCH(D3,Lists!F3:P10,0),MATCH(J2,Lists!F3:P3,0))
Thanks for any feedback.
=VLOOKUP(D3,OFFSET(Lists!$E$4:$E$10,,MATCH(C3,Lists!$F$2:$P$2,0),,2),2,0)
It seems a bit more awkward to do it with INDEX/MATCH because you have to repeat the column lookup, but here it is
IFERROR(INDEX(INDEX($F$4:$P$10,,MATCH(C3,$F$2:$O$2,0)+1),MATCH(D3,INDEX($F$4:$P$10,,MATCH(C3,$F$2:$O$2,0)),0)),"")

Using VLOOKUP across Spreadsheets.

I have two spreadsheets. I'm trying to use VLOOKUP, but it simply is not being nice. The cell that's suppose to be updated does not.
-Spreadsheet A has indices that need to be paired with Spreadsheet B indices.
-Then I need to get the corresponding value to that indices. Those values are one cell to the right of the indices in Spreadsheet B.
-The value in Spreadsheet B then needs to be placed in its appropriate cell back in Spreadsheet A.
If someone could help that would be great and ... fabulous. If you need more details or clarification let me know. I have a feeling it might be my using of Table Name across spreadsheets as the culprit for it not working properly.
Try using and Index Match combo function
Index('Column/array with return value',MATCH('Value to match','Array to find the value',0-For an exact match),'column number of the Column/Array to look in')
I am not a fan of VLOOKUP as I almost always find errors with it. There are plenty of indexMatch examples too on here and Google.

Excel search and return

So, I have an Excel-file with two sheets. The first sheet contains 7 Columns of different values.
The second sheet contains a list of special customer prices.
What i want to do, is basicly search for the value given in e.g. cell A2, in Sheet2!A:A. If i were to find this value (it's a text value), I want to return the value located in that spesific row containing the value searched for, only 3 colums to the right.
I've done a lot of experiments, but really can't get INDEX and MATCH to do the work properly for me. Anyh suggestions?
Feel free to ask for more information, as I know I can be a challange to understand..
Best regards
try offset() and match(), offset(reference,rows,cols). use match to find the number of rows or columns to move from the reference point.
Using OFFSET is against almost all best practice guides. It is a volatile function, meaning it should be avoided at all costs. Use INDEX+MATCH instead. It can do all the same stuff but has much better performance.
=INDEX(column holding the value you want to return, match to find row #, 1)
=MATCH(value you are looking for, column you are searching in, 0 means exact match)
Result:
=INDEX(Sheet2!$D$2:$D$10,MATCH(A2,Sheet2!$A$2:$A$10,0),1)
I believe the function you are looking for is a vlookup. Try this:
=vlookup(A2, Sheet2!A:D, 4, 0)
Regards,
Windyvation

Filter all unique items like Google Docs

Is there a quick/easy way to filter all unique items in an Excel 2013 column similar to the Google Docs "Unique" function?
This is not a pretty answer, but it works.
Paste this as an array formula into cell B2:
=LOOKUP(2, 1/((COUNTIF(B$1:B1, A:A)=0)*(A:A<>"")), A:A)
With the column that needs to be filtered in A:A
Then drag / copy it down as far as is required.
See it online in Google Spreadsheets
Caveats:
Does not retain original order (resulting order is in fact the reverse)
Does not automatically expand to cover all cells
Not fast, not pretty, not transparent
Footnotes:
It is trivial to use IFERROR() to filter out the #N/A errors, but I've not done this to keep the answer concise
In the same vein the header of the column A is currently also returned. This can be fixed by changing A:A to A$2:$25 in all 3 locations
Original question was for Excel 2013, all of this should work there, but I wrote and tested it in Excel 2016
I would love to hear suggestions on how to make the formula automatically expand down as far as required.
Use the Unique records only feature in Advanced Filter.
Under the DATA tab there is this: "Remove Duplicates". It'll do what you want.
There isn't an equivalent to =unique() in Excel, and I hate having to work without it.
Without =unique() trying to find all of the unique values in a large array of data is impossible. Take a dozen columns of a hundred+ entries and see what the unique values are across the whole mess and pop them nicely into a new columns. I can't figure out how to do it in Excel, but in Gdocs it's simple:
=unique(transpose(split(ArrayFormula(concatenate(A:M&",")),",")))
Using Filters, or PivotTables, or whatever, just doesn't cut it, and I haven't been able to find any hacked together ridiculous excel formula to do anything similar.
filter your data in spreadsheets
This might prove to be of some help to you.

Resources