In google sheets extracting words from column based on reference column - google-sheets

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.

Related

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 :)

Query Importrange in Google Sheets Not Importing Correctly

We are using Google Forms to collect data on our students. They use the same Google Form for all students, but as part of the form, they are asked the students name.
The data that ends up being collected you can see on the tab Form Responses 1 on the Google Sheet linked here.
I am attempting to use ImportRange to create a tab for each of the students. The formula that I am using for just one of the students is...
=QUERY(IMPORTRANGE("1nJANDP1fiQunxfxEf-EjwJrnIRICv6kLhYYY9XBXtD4", "Form Responses 1!A:I"),"SELECT * WHERE Col3 = 'Adam N.'")
You can take a look at the tab called Adam N. and you'll see it is kind of working.
One thing that doesn't seem to be working is when there is a text value in columns E-I, that text value doesn't end up showing on the Adam N. tab. Any ideas how I can get both the numbers and the text values to show up?
The other thing that seems to be a problem is the fact that on the Adam N. tab, the very first row has the same headers as the Form Responses 1 tab, but it also has the very first line of data. Any way to remove that?
Importrange is not needed since you are 'importing' from within the same spreadsheet. Also, I'd recommend using the (optional) header argument in query().
It is often noted that users are tempted to mix data types within a column. The query() function will give undesirable output. If a column is intended for numeric values then only numerical values must reside in that column. Date columns must only contain dates and text columns only contain text values.
This does not mean that numbers cannot appear in a text column as long as they are in a text format. So it is important to plan the columns in a table to make sure this rule is maintained regardless if the data table is created manually or via submissions from a Google Form.
Generally, the query() function will assume the greater number of cell types in a column to be that data type. For example, if there are 100 numbers and 20 text values in the same column then a numeric value will be assumed for that column. There is a good chance the text values will just be ignored. One way to avoid this, would be to convert everything to text.
See if this works
=ArrayFormula(QUERY(to_text('Form Responses 1'!A:I),"WHERE Col3 = 'Adam N.'", 1))

Google Query on the results from unique function

I am using google sheets and applied a UNIQUE function on a set of columns and want to apply a query function to take couple of columns and all rows from the the results to a different sheet, but I am getting blanks.
Can you please suggest what am I doing wrong?
Does the Query function not work on the results from UNIQUE function?
Open or create a sheet.
Select a cell.
Type = followed by the sheet name, an exclamation point (!), and the cell being copied.
For example, =Sheet1!A1 or ='Sheet number two'!B4.
Note: If a sheet name contains spaces or other non-alphanumeric symbols, include single quotes around it (as in the second example).

How to get last value of column in multiple sheets and add them together

I'm currently trying to get the last value of Column "D" in several sheets, then add all the values together, then calculate a percentage based on a value from a main sheet cell.
I can get =VALUE(D:D) to work and =VALUE(Animations!D15), but not a combination of both which is what I need (since the size of the column will continue to grow).
It would be best if it was the last numerical value in column D, and not account for blank spaces or strings.
Thanks!
To find the last populated number in a column use Index with an approximate Match to 1E+99.
=index(sheet2!d:d, match(1e99, sheet2!d:d))
The above retrieves the last number in column D on Sheet2.
Google sheets will not process an array of worksheet names through INDIRECT like Excel will but a 'helper' column will take care of that. If you want to hard-code a series of worksheet names into a sum of index/match formulas, then Indirect isn't even necessary.
In the accompanying linked worksheet, I've used this method to retrieve the last number from columns with numbers, text and errors. I've thrown in the 'last number' cell address as well.
Linked spreadsheet

How do I populate a cell based on multiple criteria in Google Sheets?

So here is the situation. I have one spreadsheet in Google sheets that has a column for the names of TV stations. I have a second column that lists airing times for ads. This is the format the date and times are in.
14-12-22 08:06:05
I have a second sheet that has the same column for TV station names. I also have a column that has a time range in the format
09:00-16:00
Then there is a third column for Rate.
What I am trying to do is add a Rate column to the first spreadsheet and populate that my matching up the TV Station name and the time range on the second sheet. My first thought was a VLOOKUP but I'm trying to match 2 conditions with the second one being a bit tricky since I am using an exact time vs a time range.
Any ideas?
As it is permitted to parse the time intervals I would recommend doing so (say with something like =SPLIT(A1,"-") since the results might then be arranged into a compact matrix such as shown in the image in ColumnsF:J. The differences in the rates for different stations at different times are readily apparent.
I have left the above in the same sheet as one with a representation of your other data since I (am lazy and) don't know the relevant sheet names anyway - but prefix the relevant sheet name (and !) to the column references in the formula that are later in the alphabet than C:
=vlookup(A2,F:J,match(C2,$G$1:$J$1,1)+1,0)
With extraction of the time element (into ColumnC) of your data (from ColumnA) the formula attempts to find the time from C in the first row, but accepts an inexact comparison by defaulting to the next lower value where there is no exact match. Once found, the MATCH() function returns the position of the match relative to the start of the range searched.
This is then used in a VLOOKUP() function to determine how far across to return the result of a search for the exact A column value in ColumnF.
Details of the syntax of the functions may be found via Help > Function list.

Resources