I have a list of keywords in column C. I have random strings/sentences in column A.
And column B uses a formula that finds if any cell in Column A contains any of the keywords.
The current formula I use, finds these matches perfectly. (Outputs shown in column B)
However, is there a way to find/concatenate multiple matches?. In the screenshot, you can see cell A4 have "Orange Yellow", but cell B4 only prints "Orange" from the formula. Since this cell contains 2 keywords, is there a way to print both?
current formula used- =XLOOKUP(1,--ISNUMBER(SEARCH($C:$C,A1)),$C:$C,"no match",2)
Use FILTER() and TEXTJOIN() together.
=TEXTJOIN(" ",TRUE,FILTER($C$1:$C$6,ISNUMBER(SEARCH($C$1:$C$6,A1))))
Related
I have a work sheet in which there are several cells with a specific entry - let's say "A". These are not all in the same rows/columns. After each cell is a date.
I need to count the number of cells containing "A" which also have a specific date in the cell immediately to its right. I've tried combinations of Countifs and Indirect, with no success. How can I achieve this?
This counts the number of times that there is A in column A and 1 in column B
=SUMPRODUCT(($A$1:$A$5="A")*($B$1:$B$5=1))
This outputs in cell D1
Not too difficult.
I have created a sample sheet with 8 rows and 5 columns of data.
See below, the formula in cell C12 counts the number of occurrences where the a cell with a date of October 31, 2017 is directly to the right of a cell that contains the text A.
If you want more info as to how this works, read on:
When searching for cells that contain A, you don't search in the last column of the data (in this case, column E) because it is impossible for a column to the right to have any date in it. This is why a portion of the formula says A1:D8="A" instead of A1:E8="A". This is the same reasoning why we start searching for a date in column B rather than column A in the formula.
You can achieve this with a helper row. Add additional row on top of your Worksheet. In cell "A1" enter formula below.
=COUNTIFS(A2:A2000,"A",B2:B2000,"YourDate")
Drag this formula to the rightmost of where you have data, then simply sum all values returned by formula.
Having trouble with a formula to solve this problem. I can do it when comparing one cell but can't figure out how to do it to check the entire column.
What I have two columns. Column A is a list of keywords. Column B is a list of Cities.
I want to compare all of Column B to see if any of those cities are contained on a cell by cell basis in column a
If I just use =ISNUMBER(SEARCH($B$2,A2)) it will compare all the cells in column A to B2 and the formula works. But I have a few hundred cells in Column B that I want to compare A2 too. I want to know if any of the words in Column B show up in the cell A2
Instead of just $B$1 I'd like to compare the entire B column (Like B:B but that doesn't work) and see if any of the words in Column B are in Cell A2.
Hope that makes sense.
Using the whole column B:B is not possible because of performance issues. But you could using a part of the column $B$2:$B$100 within an array formula.
Example:
Formula in English notation:
{=SUM(--ISNUMBER(SEARCH($B$2:$B$67,A2)))}
This is an array formula. Input it into the cell without the curly brackets and then press Ctrl+Shift+Enter to confirm. The curly brackets will then appear automatically.
How it works:
In array context ISNUMBER(SEARCH($B$2:$B$67,A2)) takes all values of $B$2:$B$67 into the formula and results in an array of {TRUE, FALSE, FALSE, TRUE, ...} dependent of whether the value is found in A2 or not. The -- gets the boolean values as numeric 0 or 1. The SUM then sums the array. So it counts how often 1 will be present.
Edit:
This needs the $B$2:$B$67 filled with values because otherwise the "" from empty cells will always be found. So to be more flexible we should check whether cells in $B$2:$B$1000 are empty and excluding those then.
{=SUM(($B$2:$B$1000<>"")*ISNUMBER(SEARCH($B$2:$B$1000,A2)))}
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.
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
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).