concatenating the formula with vlookup - excel

I have concatenation formula which is following
=CONCATENATE("TABLE",B22)
I want this formula to read the value from cell B22, search this value in column D in sheet called "Tables" and return the value in Column B of same row.
Can anybody help me with this?

This is a good example of where you might think to use VLOOKUP(), but can't quite get it working. VLOOKUP() only can work from left to right (meaning, the item you need to look up must be in a column left of the value you want to return).
However, Index/Match can be used to return an item regardless of what column the lookup value is in.
=INDEX('Tables'!$B:$B,MATCH(B22,'Tables'!$D:$D,0))
This will MATCH() cell B22 to a row in Tables sheet, column D. Then, return an Index (aka Value) from Tables sheet, column B of that same row.

Related

Excel using a range of cells to return value corresponding to an adjacent cell in the correct cell

I have been trying this for days, and can't get it correct.
I want to see if any value in column A matches any value in column C, and if so, return the value from column B into column D, BESIDE the match in column C.
I have tried all the suggestions for If, IFERROR, MATCH, VLOOKUP, etc, but can't get it to work. Any help would be most welcome!!
Here is a picture of my spreadsheet
Use a helper column:
In column D, use COUNTIF on each row to check the number of times that a cell in column A appears. =COUNTIF(C:C,A1).
In column E, use the formula =IF(D1>0, B1,"") and copy down
(you could of course combine these if you don't want to use the extra column)
Assuming you're starting in Row 1, in column D use:
=IF(COUNTIF($A:$A,$C1)>0,B1,"NO MATCH")
Drag that down as far as you need. This formula is saying: if the value in C1 matches anything in column A, then return the value from B1.
If this isn't what you mean, then please be clearer. Your data example is unreadable. Post a screenshot, or at least type it so it is in columns and rows. It's also unclear what you mean by "BESIDE the match in column C" What value is matching which value? That is, if A1 matches any value in C, do you want the value of B1 to show up in D1? Or do you want the value of B5 to show up in D5, if A1 matched C5?
In coumn D use formula
=IFERROR(VLOOKUP(C:C,A:B,2,0),"")
Note: this formula uses Implicit Intersection see here for some info

Returning value from range for any of the values that are looked up

I have the following data set: and use the index/match function to check if the value in column A has a corresponding value in column b compared to values that are in another sheet called Data:
=IFERROR(INDEX(B:B,MATCH('Data A1'!,A:A,0)),"")
The goal of this exercise is to identify there is value in column B for any value in column A and here is where my formula fails, because for value 2 the formula returns an empty cell, because it is only checking for the first value in the list and not all values.
Any ideas on how I can fix the formula to reflect ABC when the value 2 is in the list? I am hoping for an outcome like this:
Thanks for your help!
It may be better to use a blank column to do this. In a blank column put the following formula in the first row:
=IF(B1="",SUMPRODUCT(($B$1:INDEX($B:$B,MATCH(1E+99,$A:$A))="")*($A$1:INDEX($A:$A,MATCH(1E+99,$A:$A))=A1)),B1)
Then Copy down the range.

Is vlookup the correct thing to do to have the results next row

I'm using a vlookup to look for the all cells in the column D and see if they got a positive match in the C cells. If yes, I'm putting what is in the B cell next to the C cell.
In the example below, E2 will have what is inside of B2 after a lookup on D2 in the C column.
I've tried this formula but it is not the good one
=VLOOKUP(D2,C:C,0,FALSE)
I hope I don't need VBA
Best.
It is not completely clear exactly what you are looking for. I think you are trying to lookup data in column B based on a key in column C. If so what you want to use is
=INDEX(B:B,MATCH(D2,C:C,0))
As a breakdown, the MATCH will return a number representing which row within the range C:C matches the key D2. And, INDEX returns the element in B:B at row MATCH(D2,C:C,0).

Formula to deliver answer that is in another sheet, to the left of a matched cell

I am working on a formula that delivers text from a cell in another sheet, that is to the left of a matched cell. This is as far as I have got.
=LOOKUP(A2,Sheet1!$A$1:$A$46729,Sheet1!$B$2:$B$46729)
In sheet 1 there is a selection of product data. There are product numbers in column A and there needs to be the correct barcode placed in each cell in column B. In sheet 2 there are also product codes in column A and barcodes in column B. However there are significantly more rows of data in Sheet 2.
What is needed is a formula to place in Sheet1!B2 that looks up Sheet1!A2 in Sheet2!A2:A50000. If A2 is matched at e.g. Sheet2!A90, then the result in Sheet1!B2 should be the value in Sheet2!B90. The specific issue I am having is getting the Sheet2!B90 in Sheet1!B2.
You can use Index/Match:
=Index(Sheet2!$B$2:$B$46729,Match(A2,Sheet2!$A$2:$A$46729,0))
Or VLOOKUP:
=VLOOKUP(A2,Sheet2!$A$2:$B$46729,2,false)
The last parameters of the MATCH and VLOOKUP functions respectively are very important as it forces it to search for an exact value and not assume a sorted list. VLOOKUP would no longer work if you reversed columns A and B on Sheet2 because the lookup column has to be the first column in the lookup range.

vlookup matching with one column but not several

Got the following issue.
My sheet below.
When I'm doing a vlookup , column to column like below, I have the value LM-UN-F-GT25 that is retrieved
=vlookup(A3;C2:C58;1;false)
When I'm doing a vlookup , column to a list of columns like below, nothing is retrieved...
=vlookup(A3;B2:E58;1;false)
Why?
Thanks.
EDIT It seems that only the value on the B column are seen when doing the lookup on a list of columns...Weird, no?
VLookUp only searches for the search value in the first column of the range. Your search value is not in the first column of the range B2:E58, which is column B. Your search value is in column C. That is why you get no results for your second formula.
From Microsoft: "[VLookup] searches for a value in the first column of a table array and returns a value in the same row from another column in the table array."
See: http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx
Since you say you just want to know "if the value I have in cell A3 is present in the other cells namely B2 to E58", perhaps CountIf would be a better fit. Try:
=CountIF(B2:E58,A3)
That will tell you how many times the value in cell A3 appears in the range B2:E58.
Or maybe:
=IF(COUNTIF(B2:E58,A3)>0,"Value Present","Not Present")
That will show the phrase "Value Present" if the value is present and "Not Present" if it isn't.

Resources