Inputting data from cell in next column after search - excel

I can't find a solution to what I need so I'm asking for help.
I have 3 columns of data I need to sort through for my project.
Column A contains my search term, Column B is my database, Column C is another set of data and Column D would be my output.
So an example would be this:
Cell A1 contains apple. And I want to search through Column B for the phrase apple. Let's say it's found in Cell B50, then I want to output the value of C50 into D1.
Currently I have this:
=if("A1"=B:B,1,0)
But I don't know how to output C50 into D1 given that the phrase is found.
Just to be clear there are no duplicates of values anywhere.
Thanks.

This is simply the VLOOKUP formula, as follows:
=VLOOKUP(A1,B:C,2,0)
This looks at unique value in A1, searches for it in Column B, and gives the value from that row in the 2nd column. Searches for EXACT matches only, with 0 as the last argument.

Related

How to concatenate a column value based on another column value in excel?

I have sheet like this :
How can I concatenate values in column B based on value in column A.
Values corresponding to ID 1.1.1 are of B2:B5
Similarly, values for ID 1.1.2 are of B6:B8 and so on..
Its like it start from first id, lookup until next id, all values in column B until next Id in column A is concatenated
the result should be like this : 2,3,4,5 in single cell of column D
I am not sure if this would solve your purpose, but you can keep concatenating values till the value in column A is same and use the last value.
Assuming the case you provided, paste the formula =IF(A2<>"",B2,D1&", "&B2) in cell D2 and copy throughout the column. You can additionally create a flag for changes in column E using =IF(A2<>"",1,"") in cell E2. The results would be like this.
It's still not quite clear, what you are trying to achieve, but to simply concatenate columns with a comma as separator, you can try something like the following:
In column d2 (or column d5), type in the following formula
=B2&","&B3&","&B4&","&B5
That should get you in the right direction.

Identify which cell in a row contains a specific text

I have a column compromising of text, I would like to search through that entire column to identify in which cell does the contents contain text that I am searching for.
Snip of the excel data
I need to search for the text in the first column and identify which cell in the final column contains the data I am searching for.
You use this formula,
=IfError(VLOOKUP (A2, A2:D25, 3,False),"")
This formula will search for value match with A2 in data range A2:D25, in Column 3 means in C,, if find pull the match otherwise return a Blank. U can write "Value not found" within quotes also.
Use the formula in some column , say I,
=IF(ISERROR(FIND($A$1,F1,1)),"",F1)
Drag down till the end of list. This will return what all matches A1 with column F. If you want to search for A2, change the formula to A2 and do the same. This cannot be done for all columns in A with all columns with F as there is a chance that the same string can be found in one or more cells in F.

Search for contents in a row and say which cell its in

Hey I'm struggling how to search for contents in a row and to say which row its in.
I have two rows which have numbers, lets say
1|2
123|12
12|1
I'd want to be able to search the first row and say where it is in the second row
something like
if a1 is in row b, say which cell its in.
Could anyone help#?
Okay, I think I see what you're asking.
First, you're confusing rows and columns. Your sample data is in two columns, with three rows.
Let's say it looks like this (Starting in cell A1)
A B
1 2
123 12
12 1
In cell C1, put =IFERROR("Row " &MATCH(A1,$B$1:$B$3,0),"").
It'll return this:
It takes a value in column A, and looks for it in column B. If there's a match, it will return the text "Row " and the row number that it's found in in Column B.
Edit: If you want the actual cell (i.e. $A$1) that the matching value is found in, then use =IFERROR(ADDRESS(MATCH(A1,$B$1:$B$3,0),1),"")

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).

extracting of specific values in a cell

I'm trying to extract specific values from a specific cell where Column A is the input and Column B is the output.
Column A Column B
AB,CD,EF,GH,IJ,KL ABCDEFGH
AB,CD,MN,EF,OP,UV ABCDEF
QR,AB,ST,CD,GH,WX ABCDGH
The formula i am using in Column B is:
=CONCATENATE(MID(A2,(SEARCH("A",A2,1)),2),MID(B2,(SEARCH("CD",B2,1)),2),MID(B2,(SEARCH("EF",B2,1)),2),MID(B2,(SEARCH("GH",B2,1)),2))
However if i am to drag down the formula until the last row, it will return a #VALUE! since some of the values in the SEARCH formula did not appear Column A.
So what I need is a generic formula that will only extract the values AB,CD,EF,GH OR whatever value is available in Column A just like in my example.
Best Regards,
I would condition on whether or not something exists, and print it accordingly:
Column B's formula uses an approach that matches
IF(ISERROR(FIND(<string>,<within_string>)),"",<string>)
and concatenates these using &. ISERROR avoids error outputs, while also helping to place content (an empty string "" in this case).

Resources