Jack Trowbridge
Jack Trowbridge

Reputation: 3251

(Google Sheets) Get Value from Another Spreadsheet Based On Row Info

I have a spreadsheet (A) with 1000 rows of data. Each row as a unique ID for example "#956"

I then have another spreadsheet (B) that has rows that reference these IDs.

My spreadsheet (A) contains columns I would like to appear in my spreadsheet (B).

In a column within my spreadsheet (B), could I use a formula to reference specific columns of information, that appear on certain rows, within my spreadsheet (A).

So in summary, using the unique ID's e.g. "#999" in my spreadsheet (B). I would like to reference columns of information that are in my spreadsheet (A).

Upvotes: 2

Views: 2018

Answers (2)

player0
player0

Reputation: 1

if unique id is in both spreadsheets in A column go for:

=ARRAYFORMULA(IFNA(VLOOKUP(A2:A, IMPORTRANGE("URL_or_ID", "Sheet_name!A2:L"), {11, 12}, 0)))

Upvotes: 1

Krzysztof Dołęgowski
Krzysztof Dołęgowski

Reputation: 2660

Yes, you can. You should use Vlookup and Importrange formulas.

Importrange returns you an array and you can reference it using formulas.

Let's say that your ID's are in column A of each spreadsheet. You are in spreadsheetA in row 5 and look for a value in spreadsheeetB with the same ID. Your vlookup formula will look like this:

=vlookup(A5,importrange("[spreadsheetB url]","a1:z"),[index],false)

[index] - is a number of column from which you want to get a value.

You need to have access to both spreadsheets and allow access when running formula for the first time.

Is this what you are looking for?

Upvotes: 3

Related Questions