Data Validation - List from range [closed] - google-sheets

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 12 months ago.
Improve this question
I have two sheets one with my Listings which need to be assigned to a master category and a subcategory IF AVAILABLE. So I have two columns for my master category and the subcategory.
The second sheet, Categories, contains also two columns, one for each. The first column lists the master categories and the second column the subscategories which in some cases cells are empty.
I added a data validation on my Listings sheet column and I can select the Master Category from a dropdown list. What I would like to do is have a dropdown list to the Subcategory that pulls the subcategories from the Categories sheet but ONLY the ones that belong to the master category.
I tried to do it with a LOOKUP formula but the same formula that works OK in the sheet, returns a "Please enter a valid range" error.
Here is an example:
https://docs.google.com/spreadsheets/d/1ukmc8T1jDsxWy5aQJZVU3q2YNJvUxaATOzvAvO7WdKA/edit?usp=sharing

OK, I figured it out. I was taking the wrong approach. I created a data validation for the first column that pulled all the categories. On the second column I added a VLOOKUP that brought the master category (if available).

Related

Scrape from website and save into different columns in a spreadsheet [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
Suppose there's a website that has a list of details of some companies, for example, name, HQ area, turnover, etc. How do I scrape that data and fill it into different columns (like name, turnover) with each row having the details of a separate company?
Google Sheets allow you to import html tables or list with the IMPORTHTML(url, query, index) function.
For example, using the Wikipedia page List of largest companies by revenue as an example.
We want the data from the main table, so the first thing that we have to do, is to know what index it occupies in the page. To do this, we can use document.querySelectorAll('table') or $$('table'), as you can see from the result, the table that we want is in the position 5 of the array, so inside our google sheet we can use:
=IMPORTHTML("https://en.wikipedia.org/wiki/List_of_largest_companies_by_revenue","table",5)
From here, you should change the query parameter to list and find what index it occupies within the page using the method described above. In any case, you could always use IMPORTXML(url, xpath_query), and knowing the XPath of the information, you could come up with a similar solution.

Display the values using query function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I want to display the values according to the text that which is comes in the drop-down list. one of my friends from this platform helped me to develop that. But that function is only displaying based on two texts. can I add it one more text to generate details?
Here I'm adding the sheet for more clarification. Take a look and you will understand what I need. I want to display which comes under "insurance claim" when we select yes/no.
https://docs.google.com/spreadsheets/d/1VsLKHSZsTMeBctnINnsixKISgNkTHDV-dkO4ORsDjgI/edit#gid=595280251
You just need to add the and F contains '"&$C2&"'" to your current formula on the cell A5 of the sheet RESULTS.
For more details please see the Query documentation
Your cell A5 will become this:
=query(LIST!A1:G,"Select * where B contains '"&$A2&"' and C contains '"&$B2&"' and F contains '"&$C2&"'")
If you want to have the values of both sheets in your RESULTS sheet, you can add the other sheet to the range of the query:
=query({LIST!A1:G;LIST2!A1:G},"Select * where Col2 contains '"&$A2&"' and Col3 contains '"&$B2&"' and Col6 contains '"&$C2&"'")

How to consolidate data in google sheet using query function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Hell,
I encountered one problem while combining different sheets(tabs) into one master sheet, e.g I have three sheets named Cola, Pepsi & Thumbsup, I consolidated their results all in my Master sheet using Query formula with null. Whenever anyone entered data in Cola, Pepsi & Thumbsup sheet it comes to my master sheet somewhere in Between the rows. I need it to comes queue wise, is it possible?
The problem I faced is, I am writing a remark on my master sheet on each entry so whenever someone added new data in Cola, Pepsi & Thumbsup it inserted in between the data and break the sequence of my remarks.
The remark I wrote for e.g Cola 103 it shift to cola 102 when someone enters new data in cola sheet.
About the query, it just displays the values. It's kind of impossible to control as your mention. I recommend to use app-script (macro), function append or getValue setValue or getRange copyto as text paste not just display
If your data have timestamp each row. It might work, sort by depending on date and time added. Need to use just one column sorted. In function query ...order by A asc
Anyways, I still recommend to use app-script (macro)

How can I list each row that matches a string, set by a dropdown? Filter? VLookup? Query? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
https://docs.google.com/spreadsheets/d/1mvBFBuRUl2qiPktE1Y4lCTeaSK4BwJ7S4Nf0S33LTRg/edit?usp=sharing
On Sheet2 I am wanting to show all the columns associated with a specific string that comes from a dropdown data validation. I have tried using VLOOKUP but that only outputs the first entry found, I want to print every entry along the row.
I put an example of what I am trying to get it to look like but not sure if VLOOKUP or QUERY or FILTER or something else is what I need
In your example spreadsheet, sheet 2, delete everything in the range F3:I and then enter in F3
=query(A:D, "where D='"&F2&"'",1)
If you want to reference the data on the sheet you'll have to use
=query('Draft Board'!A:D, "where D='"&F2&"'",1)
See if that works ?

Search Entire Worksheet and Return Cell Value of the Matched Column [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Using Google Sheets, how do I search the entire contents of one worksheet, and return a value from a specific cell when a match occurs? You can assume that the worksheet that will be searched on has unique values.
For example: I have a worksheet that contains players that belong to two different teams. On the other worksheet, I have a list of all the players, and I would like the matched team name to show up next to the player.
In the linked example, I want to search the "Teams" worksheet and return the value of Row 2 (the name of the team) in the cell next to the player (in the "Team Name" column in the "Search" worksheet).
If the formula is working, I would expect to see "Team A" next to "Smith, Bob" in the "Search" worksheet.
Google Worksheet Teams
I am suggesting a formula like this:
=INDEX(Teams!$2:$2;0;SUM(IF(Teams!$A$3:$B$5=$A2;COLUMN(Teams!$A$3:$B$5)-MIN(COLUMN(Teams!$A$3:$B$5))+1;0)))
where
Teams - is the name of worksheet with team and team member names
$2:$2 - is 2nd row in Teams worksheet holding team names
$A$3:$B$5 - is table holding all player names (team names are one row above this table)
$A2 - player name that we are looking for.
In MS excel:
Type the formula, and then press CTRL+SHIFT+ENTER
In Google-spreadsheet:
Write it inside ArrayFormula() function like this
=ArrayFormula(INDEX(Teams!$2:$2,0,SUM(IF(Teams!$A$3:$B$5=$A2,COLUMN(Teams!$A$3:$B$5)-MIN(COLUMN(Teams!$A$3:$B$5))+1,0))))
Google Worksheet Teams Solution
Assuming:
your search criteria is in column A on the search sheet.
The sheets containing the teams is called 'Teams' and team names are in column B.
Player names are in column A on 'Teams'.
=INDEX(Teams!B:B, MATCH(A:A, Teams!A:A,0))

Resources