Conditional Matching in Google Sheets - google-sheets

I have two spreadsheets. Each has a column A that has an account number. But each has a different info about that account. The accounts also don't share the same set there maybe some the other doesn't have. What I want to do is check Sheet one column A vs sheet two column A and based on that populate a cell in Sheet 1 with Sheet two column B. Could anybody help me with how I might do this.

My Sheet2 looks like this:
You can use VLOOKUP in Sheet1. This formula would work: =vlookup(A2,Sheet2!A:B,2,0)
You can see it put in the cell C2:
If you don't like the #N/A error you can embrace the formula in IFERROR with the parameter "" which would yield an empty string:
=iferror(vlookup(A2,Sheet2!A:B,2,0),"")

Related

Importing values of column from other sheet based on a matching values in a different column across both sheets?

Hey Stack Overflow Sheets, I have a question regarding a use case we want to create in our Google Sheet, either with built-in functionality, or with an extension like Sheetgo.
We have 2 sheets with multiple of the same columns (properties) and rows (users). The problem is that only one of the sheets is a trusted source for one column’s data (“source sheet”), and the other sheet has empty or outdated values for the same column (“outdated sheet”), and we need both sheets to have this column match values in rows that have a matching value for another column across both sheets (in our case, an “email” column). After they’re matching, we want to change the formula to sync any changes made for that column between both sheets.
Here’s an obfuscated data example:
Source sheet:
https://docs.google.com/spreadsheets/d/1uxqC3lB15UHhKTzjZyzzVIj5tlPjhCCCZ48xHYEcm0o/edit?usp=sharing
Outdated sheet:
https://docs.google.com/spreadsheets/d/1ckoCh8gMwt2QeBRH1dB2dyFPJUukrjQ-SCgucTL8rhc/edit?usp=sharing
In the example, we’re looking for a formula that would allow us to have a “Type” column value injected into the Outdated Sheet’s Type column, based on both sheet’s matching Email column value. And then, have it so if a row’s “Type” value changes in either doc, the other doc follows.
What formula or extension would I use to go about this? Any help appreciated, thanks!
I tried to create a VLOOKUP and MATCH formula, but I couldn't yet figure out how to have the function first LOOKUP into the Source Sheet, then inject it into the Outdated Sheet based on a matched email column value. Sheetgo made the LOOKUP easier, but I still couldn't figure out how to do an exact operation.
Use importrange() and vlookup(). Put this formula in cell A1 of the target spreadsheet:
=arrayformula(
lambda(
import,
iferror(
vlookup(
C1:C,
{ index(import, 0, 3), index(import, 0, 1) },
2, false
)
)
)(
importrange("1uxqC3lB15UHhKTzjZyzzVIj5tlPjhCCCZ48xHYEcm0o", "Sheet1!A1:F")
)
)

To identify same words in two tabs in a google sheet

My Query is i want to highlight the duplicates in the two tabs in a sheet. My sheet is attached along with this question. In that "Sheet A" & "Sheet B" have common names in it i want to color it for the duplicates.
Sheet : https://docs.google.com/spreadsheets/d/1hL64Q7REorVkjJNKAEGPFBdinlIn8VwnE6H7L9fYB2c/edit#gid=0
If it is possible, is there any option to find the duplicates between two google sheets ?
if yes then pls help me to find duplicates in Sheet A in Match 1 sheet and Sheet C in Match 2 Sheet.
Sheet 2 : https://docs.google.com/spreadsheets/d/1xAUmvmaZPvfJwCHD_esrshLccgKM3VmP1CI46mMoRB8/edit#gid=0
I have an answer that shows how this can be done. See the tab I added, "Sheet 1-GK", into your sheet.
The formula in C1 looks at the data from Sheet 2 to see whether each name in Sheet 1 column A is found in Sheet 2.
Here is the primary formula:
=ARRAYFORMULA(IFERROR(
IF(MATCH(A2:A9,IMPORTRANGE("https://docs.google.com/spreadsheets/d/1xAUmvmaZPvfJwCHD_esrshLccgKM3VmP1CI46mMoRB8/edit","'SHEET C'!A$2:A$8"),0),
"Y",
"N"),
"N"))
In the sheet, I have wrapped it in an array, {...}, to also add the column header text.
Then a conditional formatting rule is used to highlight the rows that have "Y" in column C.
Note that you can either hide column C, or incorporate its formula logic into the conditional formating rule, to do everything there.
Is this what you were looking for, or did you need something else?

Vlookup in same range within different sheets on a different Google Spreadsheet | Google Sheets

I'm hoping to do a VLOOKUP in a different Google Sheet based on 2 criteria: sheet name and then the lookup value. My data looks something like this:
A1 B1 C1
Sheet_Name Lookup_Value Lookup_Value
Sheet_1 123456 =vlookup(B3,"Sheet_1!$A$1:$C$1000",2,false)
Sheet_1 987456 =vlookup(B4,"Sheet_1!$A$1:$C$1000",2,false)
Sheet_2 654123 =vlookup(B5,"Sheet_2!$A$1:$C$1000",2,false)
Sheet_3 959595 =vlookup(B6,"Sheet_3!$A$1:$C$1000",2,false)
Sheet_3 621346 =vlookup(B7,"Sheet_3!$A$1:$C$1000",2,false)
Is there a way I can choose the sheet in my vlookup equation based on the value in column A rather than going in manually and updating this?
Currently, I'm trying this, but it's not working:
=vlookup(B3,importrange("key_here",indirect(A3)&"!A1:C1000"),2,false)
Use INDIRECT:
=vlookup(B3,INDIRECT("'"&A3&"'!$A$1:$C$1000",2,false)
Figured it out: Google doesn't require the indirect function. So what works is:
=vlookup(B3,importrange("key_here",A3&"!A1:C1000"),2,false)

Formula to search for a matching item on two Google sheets and then fill in a third value if a match is found

I have two google sheets.
-Sales Sheet
-Goal sheet
On the sales sheet:
Column I has a list of items
Column J is blank
On the goal sheet:
Column A has a list of items
Column I has a list of values.
I need a formula to enter on the Sales sheet, which will search for the item listed in column I for a matching item on column A of the goal sheet.
When a match is found, it needs to take the value found in column I of the goal sheet and place it into column J of the sales sheet.
I've tried several formulas using MATCH but I just can't seem to get it to work. Any help would be sincerely and greatly appreciated!!
I tired this formula, but it seems to be filling in the value from column A instead of the corresponding value from column I. I know I'm missing a step here, but I don't know where to start:
=INDEX(IMPORTRANGE("[Sheet ID]","Page!I1:I500"),MATCH(A121,A1:A500,0))
I figured it out:
=INDEX(IMPORTRANGE("[sheet ID]","Goal-sheet!$I$2:$I$500"),MATCH(I5,IMPORTRANGE("[sheet ID]","Goal-Guide-Internal!$A$2:$A$500"),0))

How to use Sumif using range from a complete different Googlesheet/doc

I know how sumif works when I need to access it within the same Google "workbook" (using the analogy from excel). By workbook I mean a collection of sheets, not sure whether there is a different way to refer to Google workbook.
For example in the sheet (Example 3): https://docs.google.com/spreadsheets/d/1Dm-N-1X38zHartE3JbPUtWDnYwEpkGHl6v06huvjSa8/edit#gid=0
I have Sheet2, with column A contain strings and column B containing numerical value. On sheet 1, I have a sumif function which can be query data stored in Sheet2, and sum the cells which match A1 in Sheet1.
The problem starts happening when I try to refer to ranges in a completely different workbook, which is shown below.
I am trying to do a sumif over 2 ranges from a different "workbook". The data is stored here (Example 2): https://docs.google.com/spreadsheets/d/1P5Inf09fLSRmsGbG7LwlE4V-r7DzqY0SB5tJuMKMZH0/edit#gid=0
The Sumif function is in Cell B1 of the following sheet (Example 1):https://docs.google.com/spreadsheets/d/1AitilELd6w7Dbv9d-mKhBYGTBaO6DdkU29Y5mofX2TI/edit#gid=0.
From my understanding importrange is typically used to refer to ranges in completely different workbooks, as a result I use importrange as the first and last arguments in the sumif function in the Sheet Example 1.
What am I doing wrong? Why is this not working?
Can anybody help?
Thanks a lot
See if this query does what you want:
=SUM(query( QUERY( Importrange("1P5Inf09fLSRmsGbG7LwlE4V-r7DzqY0SB5tJuMKMZH0","Sheet1!A1:B10") ) , "select Col2 where Col1 contains '"&A1&"'" ) )

Resources