2

I'm making a list of all the items I own. I want to place all the items in a list on a single sheet. Each Item will have a "category code" attached to it. I would like additional sheets to:

  1. Look through the master list for a specific category code.
  2. Then, when it finds a matching code to copy the entire row over to the new sheet.

What command do you use to search the column for a value, and then tell sheets to print the associated row?

1
  • To print all rows (but only) that meet the criterion. I have done some research with little luck.
    – Andrew
    Nov 8, 2017 at 18:08

1 Answer 1

1

I have very little information to work on. I'm assuming you have the "category code" in a different column for the row entry. "Addition sheet" means you want it in different tab of same spreadsheets. You can use this code in your cell from where you want to start printing the rows

=Query('<Sheet name>'!<Column Range>,"Select * Where <column> = '<category code value>'")

Suppose Sheet name is Sheet1, Column range is A2:Z, column with category code is B and category code you're looking for is "Medicines".

=Query('Sheet1'!A2:Z,"Select * Where B = 'Medicines'")
1
  • Okay That does tell me how to find it. You were correct I have one tab with all the items. There is a column labeled category code. I want to search that column for a specific code, then when it finds one to copy the entire row into a different tab. Now that I know how to find it. I guess i can use an if statement, with that though what would I use to copy the row that the query found?
    – Andrew
    Nov 9, 2017 at 18:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.