Import data between Google Sheets depending on whether specific data matches - google-sheets

I am including a quick screenshot that shows my question in a slightly more logical way, but basically I have two separate files, and would like to pull data from one into the other from specific locations, IF the names are matching from one cell to the other. Hopefully that makes sense:
Importing specific data between sheets if specific cell text matches
Update
Here is the sheet where the data is being pulled FROM:
https://docs.google.com/spreadsheets/d/1sfrmjqULdw4ELRIBmDURzlnIN0EzvpMCwHAmj8SuTMU/edit#gid=0
Here is the sheet where I would like to pull the data INTO:
https://docs.google.com/spreadsheets/d/1HvPGl0ZjAO29DPTDkmpMVu9GFQIUJHqxOZF_itwt1to/edit#gid=1458193311
I should also note, that while I somewhat understand that I can ImportRange and specify some details, how do I specify a range related to a specific name, if that range is different for each name?
I.E. Student 1 has data from A2:D10, but Student 2's data is F2:J10...etc.
Can we specify column and rows according to the position of a name?

From the question
how do I specify a range related to a specific name, if that range is different for each name? I.E. Student 1 has data from A2:D10, but Student 2's data is F2:J10...etc.
If the reange doesn't include a key, then you should make a relationship table setting for each name the corresponding range reference as text, then use VLOOKUP, QUERY, FILTER, INDEX/MATCH to get the corresponding range reference.
Let say that we add a sheet as set it's name as Table. Then con Column A there are the names and on Column B the corresponding ranges reference. If the name to be imported is on A1, the formula to use could be the following:
=IMPORTRANGE(spreadsheet_key_or_url,VLOOKUP(A1, Table!A:B,2,0))

Thanks #Ruben! I ended up using the following formula with a Named Range (StudentLookup), and then edited which column it pulls from, for each corresponding cell and it's data:
Cell B6: =INDEX(StudentLookup,MATCH($A6,other!$A$1:$A$9,0),MATCH($B$3,other!$A$1:$Z$1,0))
^for data I wanted in that cell and then for the next cell and so on:
Cell C6:
=INDEX(StudentLookup,MATCH($A6,other!$A$1:$A$9,0),MATCH($B$3,other!$A$1:$Z$1,0)+1)
And I also just pulled the data directly from the other workbook into another sheet in this workbook for easier reference. Thanks again!

Related

In google sheets extracting words from column based on reference column

In this scenario, I have a reference column (A) of 6 types of devices, and a second column (B) of several thousand specific device names including the word from the reference column in the string.
I am trying to extract into a new column (C), from the column B just the relevant word from the string that corresponds to the reference column.
So far have been unsuccessful in finding the right working formula.
You can use VLOOKUP function to search particular data and get desired result.

How do you convert a String to Object in Google Sheets?

So I'm making a dependent dropdown column in Google Sheets that has a bunch of different things of a type. I've named the ranges I want to use and I've got column A with those names in the dropdown. The problem is, I can't use the contents of column A to reference in column B's data verification.
E.g. I select Tech in column A, column B reads that as "Tech" when I want it to be able to reference the named range Tech. How to you convert from the string "Tech" to the named range Tech? Is there a way without using a stupidly long nested IF on every single row of B column's data verification?
Thanks in advance :)

How to apply arrayformula to a series of columns

I'm trying to make a spreadsheet to track membership for an organization.
Basically my design is an input sheet with columns of names associated with expiration dates, then another sheet that collects all the unique names and all of their associated expiration dates, and then one last sheet that filters the names into only those with expiration dates in the future.
I am able to collect all the unique names into one column using an arrayformula, but I am stuck trying to do a lookup operation of some kind that, for each name, will look for the name in each column and if it appears then it will add the associated expiration date to it's list (and otherwise add a blank cell, and then I can filter out the blank cells).
Is there a way to use vlookup or anything else in an arrayformula to do a series of operations for all columns in a range? Also, I want to use arrayformula because I want the formula to be infinite so the spreadsheet can keep growing. I've tried using
=ARRAYFORMULA(IF(ISERROR(VLOOKUP(A1:A,Sheet1!A2:200,1,FALSE)),,Sheet1!A1:1))
But vlookup, and anything else I tried like match, interprets Sheet1!A2:200 as a single range and performs a lookup only in the first column and does not do a separate lookup in each column.
For example, I might have this input on Sheet1
And want this result on another sheet
I suspect the combination of what you would really like and what is reasonably practical is a script but the following is an array formula, though would be cumbersome to extend and does require copying down (from B1):
=split(if(ISERROR(match(A1,Sheet1!A:A,0)),"",Sheet1!A$1)&"|"&if(ISERROR(match(A1,Sheet1!B:B,0)),"",Sheet1!B$1)&"|"&if(ISERROR(match(A1,Sheet1!C:C,0)),"",Sheet1!C$1),"|")
Assumes a unique list of names in ColumnA, such as created by:
=unique(QUERY({Sheet1!A2:A6;Sheet1!B2:B6;Sheet1!C2:C6},"where Col1 is not NULL"))
in A1.

Convert grade to value in google sheets

I want to create a gradesheet using google sheets, each assignment grades are entered as letters (A thru F). Each grade is given a numerical value - decided dynamically at the end of course.
I want to create a gradesheet in which I can enter each students grades as letters and in the end while calculating the final grade each letter is converted to a number and totalled.
Is there anyway to do this in google sheets.
I suggest you set up a little table as highlighted in the image and name it (I chose GTable):
then apply a lookup formula such as:
=vlookup(A1,GTable,2,0)
If you do so without some kind of table then you may be trying to fix formulae each time the dynamic decision is changed, and fixing a table may be easier.
You could create a second gradesheet based off of the original gradesheet, but instead of letter values, each cell would have something like
=IF(B2="A",100,IF(B2="B",90,IF(B2="C",80,IF(B2="D",70,IF(B2="F",60,0)))))
In this case, B2 is the cell corresponding to the original gradesheet, so each cell in the new gradesheet would correspond to a cell in the original gradesheet. You can then replace the hardcoded numbers with values from the spreadsheet or expand the conditional to cover more letter grades, and use this new table to calculate the final grade.

reference cell via two partial matches on another cell

I need to match two conditions on the cell Name and add the price information into cell price if both condition match. In other words, if Name contains both conditions, get the price. I tried different approaches using QUERY, SEARCH; FIND; VLOOKUP but I got stuck somewhere in the middle. Here's the example sheet (Google Spreadsheet solution preferred over Excel):
https://docs.google.com/spreadsheets/d/1zwG3_5Ctg_IZ1kI04Uee-qIvMrNQ4GmEwySmYcMKLfA/edit?usp=sharing
Maybe important: Both, the Name values as well as the whole reference table get pulled from other files dynamically. So I don't know anything concerning order or length of these columns in advance, not even if there are matches at all.
In addition to previous answer AND given the current set of data (in a Google spreadsheet), in B2 try:
=ArrayFormula(iferror(vlookup(regexreplace(A2:A; "[^A-Z]"; ""); {E2:E&F2:F\G2:G}; 2; 0)))
and see if that works ?
Based on your spreadsheet table:
you can try the following formula:
this formula works in excel not in google spreadsheets
=IFNA(INDEX($G$2:$G$6;MATCH(1;COUNTIFS(A2;"*"&$E$2:$E$100&"*";A2;"*"&$F$2:$F$100&"*");0));"NOT FOUND")
this is an array formula, so press ctrl+shift+enter to calculate the formula.
i think it will do the job.
here is the example file to download

Resources