I need for my two data sets to find exact match.
In sheet called set1 I need for it to look up results of set2 and if set1 sheet has a match with set2 sheet then print Match, otherwise no match.
Below is what I tried:
=INDEX(A:A,MATCH,set2!A:A)
use in row 1:
=INDEX(IF(REGEXMATCH(A:A; TEXTJOIN("|"; 1; set2!A2:A); "Match"; )
Related
I'd like a formula to return all the matching values from column A if ANY of columns B-AZ equal the query value. Said differently:
=query(DATA!A:Z, "select A Where 'DATA!B:AZ' = C2").
Formulas I cobbled together, but don't work:
=query('Inv by shelf'!A:AZ,"Select A WHERE '"&C1&"' = '"&TEXTJOIN("|",1,'Inv by shelf'!$B:$AZ)&"'",1)
=filter('Inv by shelf'!A2:A,'Inv by shelf'!B:AZ = C1)
TIA!
Try FILTER() formula with MMULT().
=FILTER('Inv by shelf'!A2:A,MMULT(ArrayFormula(--('Inv by shelf'!B2:Z=C1&"")),SEQUENCE(COLUMNS('Inv by shelf'!B2:Z2),1,1,0)))
Functions references.
MMULT
SEQUENCE
FILTER
See you workbook sheet harun24hr.
This is best explained with an example:
The following sheets:
Trades:
Items:
Query:
The query in cell A3:
=Query(Trades,"Select B, C where A = 0")
What im hoping to do is then further query the itemID (only the first result column) to return its ItemName and combine that result with the ItemQty (second column).
is this possible to do?
Check out VLOOKUP - it's how to do database-like queries / joins on spreadsheet tables.
I think I got what you're after here:
I'm trying to get rid of bad data in my inventory list.
Sheet A is a sheet that is a list of all my products.
Sheet B is a sheet, generated from another piece of software, that lists all of my products that have been sold
I need to generate a third sheet, Sheet C, that lists all the unsold products. So, the number of rows between Sheet B and Sheet C should add up to the total number of rows on Sheet A.
How do I cross-reference/filter Sheet A with B to achieve C?
The following formula returns the list of entries from column A of Sheet1 that are not present in column A of Sheet2:
=filter(Sheet1!A2:A, isna(match(Sheet1!A2:A, Sheet2!A2:A, 0)))
Explanation: match returns error code #N/A for those entries in Sheet1!A2:A that are not found in Sheet2!A2:A. The isna function converts those to True boolean values. Finally, filter returns those rows for which the second argument evaluates to True.
The filter can return more than one column: it can be, for example,
=filter(Sheet1!A2:Z, isna(match(Sheet1!A2:A, Sheet2!A2:A, 0)))
But match requires a one-dimensional range, so you need a column (here assumed to be A) which can be used as an identifier of a row.
I have a Googlesheet with Column A= ID like B-124992 or D-133739 and several different ID's as well, Column B= Title description. I want to Merge only the "B-" and "D-" -like ID's with their respective Title description. I'm using ArrayFormula in column C like:
= ArrayFormula(IF(ISNUMBER(FIND({"B-","D-"};'BacklogData'!A2));A2&" - "&B2;""))
The result is merging as expected but the output is distributed in column C (shows all "B-" merge results) and column D ((shows all "D-" merge results).
How can I get the results all in column C?
In C2 try:
=ArrayFormula(if(len(B2:B); if(regexmatch(A2:A; "(B-|D-)"); A2:A&"-"&B2:B;);))
This will reference the colA and output the concatenation of col A and colB if col A starts with either B- or D.
NOTE: you will have to erase all formulas you currently have in col C.
Hope that helps ?
EDIT: not sure if you are referencing another sheet, but in that case you will have to add in the sheet name, like you did in the example you gave.
I don't think you need an array formula for this - all you need is an OR condition in a standard formula:
=IF(OR(LEFT(A2,2)="B-",LEFT(A2,2)="D-"),A2&" - "&B2,"")
and copy as far down column C as you need. Since this is not an array, it will only return one result per cell which is what you want.
I am trying to conditionally format a row in Google Sheets based on the result of a QUERY operation. I can get the QUERY to return the value I want (either 0 or non-zero), however QUERY insists on returning a header row.
Since the QUERY now takes up 2 rows for every row of data, changing the format of the row based off the QUERY result starts to get weird after just a few rows.
The problem I am ultimately trying to solve in the case where I enter a list of names, and I want to compare each name to a list of "NSF Names". If a name is entered, and it exists on the NSF list, I would like to flag the entry by highlighting the row red.
Help is greatly appreciated.
Edit: Formula, as requested:
=query(A:D,"select count(A) where C contains '"&E1&"' and D contains '"&E2&"'")
A:D is the data set (A is a numeric ID, B is full name, C and D are first and last names respectively).
E1 and E2 are placeholders for the person's first and last name, but would eventually be replaced with parsing the person's name, as it's inputted on the sheet (TRIM(LEFT(" ", A2) etc...)
I can get the QUERY to return the value I want (either 0 or non-zero),
however QUERY insists on returning a header row.
There might be better ways to achieve what you want to do, but in answer to this quote:
=QUERY(A:D,"select count(A) where C contains '"&E1&"' and D contains '"&E2&"' label count(A) ''")
A query seems a long-winded approach (=countifs(C1:C7,E$1,D1:D7,E$2) might be adequate) but the label might be trimmed off it by wrapping the query in:
index(...,2)