Currently I am using the below to see if cells in column B exist in Column A...
=IF(ISERROR(MATCH(B1,A:A,0)),"False","True")
... However I've just realised the need to not check for an exact match, but rather if the cells in column B contain text that appear in any of the cells in column A.
For example, if a cell in column B contains "TIC081_CL1" then I could return "true" if column A contains a cell with only "TIC081"...
Can anyone help me with this please, as my current working only works for eact matches. Many thanks for any assistance!!!
Since it is guaranteed that there will be an underscore "_" separating the values you are searching for we only need to check 2 distinct conditions:
If the entire value B1 is found within A:A
If the value before the _ is found within A:A
We can accomplish that by using an additional MATCH derived from your original formula:
=IF(ISERROR(MATCH(MID(B1,1,FIND("_",B1)-1),A:A,0)),IF(ISERROR(MATCH(B1,A:A,0)),"False","True"),"True")
You can alternatively do this using 2 COUNTIF formulas:
=IF(COUNTIF(A:A,B1)+COUNTIF(A:A,MID(B1,1,FIND("_",B1)-1))>0,"True","False")
Related
I have 4 columns
column A is the range for lookup
Column B is set of strings per cell in A
column C is the lookup value of the columnA
column D is a sentence that may/may not contain the string in column B.
I need to find first if C is in Column A and if found, i need to check if the value in column B in reference of the cell in A is present anywhere in cell D.
This may be confusing but let me put it in a image.
I tried using index match and search but always not referencing to what i want.
Hope you can help! Thanks
Besides the solution commented above, you may try this as well using XLOOKUP() & SEARCH() wrapped within an ISNUMBER()
• Formula used in cell E2
=ISNUMBER(SEARCH(XLOOKUP(C2:C5,A2:A5,B2:B5),D2:D5))
Or, without #SPILL
• Formula used in cell F2
=ISNUMBER(SEARCH(INDEX($B$2:$B$5,MATCH(C2,$A$2:$A$5,0)),D2))
Fill Down for the rest of the cells !!
Long time lurker first time posting. I have a problem regarding matching columns in excel. I searched for different methods but I can't seem to find something that fits my needs and requirements.
I have two columns. I need to check and see if certain process's or values(column c) match a master list(column a). I have a rule set up for matches between the two columns and it highlights the matches in the master list column when compared and fills it green.
The problem I am having is that the master list contains duplicates. So two rows will have the same data. For example. a1=str123 and a4=str123.
When using the Match command, it turns both cells in column a (a1 & a4) green but this occurs even if the match column only contains one instance of the data (c5=str123).
I am looking for a way to do a Match but the master list to only turn a cell green if there is one instance of it and then ignore the match that occurred when checking for matches for another cell.
So basically I am looking for a way to setup matching between two cells but once one match has been found to ignore it when going through the rest of the list.
Any help would be appreciated.
This can be done by conditional formatting using two match formulas. I assume you have a fixed set of master values in column a, say in cells A2:A6. I will assume you have values to test if they exist in column C, say in C2:C6 and other columns are blank. In column B enter numbers 1..5 in B2..B6 as an index to the master values. In column D enter the formula =MATCH(C2,$A$2:$A$6,0) in D2 and copy down. In column E enter the formula =MATCH(B2,$D$2:$D$6,0) in E2 and copy down. Select the master range A2:A6 and choose conditional formatting, using the formula =ISNUMBER($E2) and format green fill or whatever you want. With this combination the formulas in column D find the first matching master item, and formula in col E tests to see if the index in col B is in the list of matches in col D.
I have five columns in my spreadsheet, three of which are filled with assorted names( the first, fourth and fifth columns).
I need a way to cross-reference each cell in the A column with the D and E columns, then have an output that answers the question in the B and C column (which you can see as the Xs), as to whether it was found. I've tried a combination of VLOOKUP and MATCH, but this is proving to be out of my realm. I haven't used excel much lately.
EDIT: Added a picture instead of a diagram
In Cell B3 use =IF(COUNTIFS(D:D,A:A),"","X")
and in C3 use =IF(COUNTIFS(D:D,A:A),"","X")
copy down as far as required
Formula says "If count of names in D:D equal to name in current row in A:A is > 0 then return blank, else return "X"
Test is case-insensitive.
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).
I have tried finding this solution on the web but have not had success for this specific problem. In Excel 2010 I have some data in column A where each value may partially contain data in column B.
EX:
Column A might contain "http://google.com/webmasters"
Column B might contain "google.com"
This should give me a match.
I want to print in Column C all values in column A that do not contain any values from column B.
EX:
Column A
http://dir.mydomain.tdl
http://myotherdomain.tdl
http://blog.otherdomain.tdl
http://www.lastdomain.tdl
Column B
mydomain.tdl
lastdomain.tdl
Column C (results required)
http://myotherdomain.tdl
http://blog.otherdomain.tdl
Any help would be greatly appreciated.
I think I have the solution using ARRAY formula. Assuming your input AND that columns A-C have titles, or simply, strings are listed starting cells A2 and B2, do the following:
C2: type the formula =IF(OR(NOT(ISERROR(SEARCH(INDIRECT("B2:B"&(COUNTA($B:$B))),$A2)))),"",$A2) but press CTRL+SHIFT+ENTER instead of usual ENTER - this will define an ARRAY formula and will result in {} brackets around it (but do NOT type them manually!).
Autofill formula in C2 until the end of list in column A, e.g. if the last value is in A100, then autofill up to C100 (how long column B does not matter here).
You may then copy & paste obtained results as values and sort out empty strings.
Here you go! The key here - we check every string in column A for having at least one match among array of strings in column B, and return empty string in case at least one match found.
For your convenience sample file is shared: https://www.dropbox.com/s/janf0xxon4z2yh5/DomainsLookup.xlsx
Maybe not the must efficient but you could simply use two arrays - one for Column A and one for Column B. Iterate through ColumnA array to see if it exists in ColumnB array (use Array.IndexOf or .contains). If it does you could remove it from the ColumnA array and output the remaining values in Column C as the remainder.