How to find something in one sheet and add it to another? - google-sheets

I have a problem with Google Sheets. I need to create a list based on the cell contents in the new worksheet. For example: If in the 'Example1' sheet, in cell E2, the value is 'yes', add the entire row to the 'Example2' sheet. Is it possible to do it in Google Sheets?

try it like this:
=QUERY(Example1!A:Z; "where E='yes'"; 0)

Related

Get range from formula an a sheet and use it in a different formula that gets data from a different sheet in Google Sheets

I have two sheets Sheet Main and Sheet Unique
On sheet Main, I have a range of data with headers
On sheet Unique in cell A1 I have a drop-down of all the header names from sheet Main
In cell B1 of sheet Unique, I have the formula
=SUBSTITUTE(ADDRESS(A1,MATCH(A1,Main !A1:AA1,0),4),1,"")
Which gets the Column letter of the header on sheet Main from the dropdown on sheet Unique
Is cell A2 on sheet Unique I have the formula
=SORT(UNIQUE(TRANSPOSE(ARRAYFORMULA(TRIM(SPLIT(JOIN("|",Main!F2:F),"|"))))))
Which gets the unique list of elements from the column on sheet Main that was selected from the drop-down on sheet Unique.
In this case, F2:F is the range on sheet Main of the selected header from sheet Unique
I want to update the formula
=SORT(UNIQUE(TRANSPOSE(ARRAYFORMULA(TRIM(SPLIT(JOIN("|",Main!F2:F),"|"))))))
automatically every time I make a new selection from the Drop-down on the sheet Unique
Combing the two formulas I get and adding INDIRECT
=SORT(UNIQUE(TRANSPOSE(ARRAYFORMULA(TRIM(SPLIT(JOIN("|",Main!&INDIRECT(SUBSTITUTE(ADDRESS(Y1,MATCH(A1,Main!$A$1:$AA$1,0),4),1,""),"|"))))))))
I get the error formula parse error I can not get what I am doing wrong!
Thanks for any assistance
Try this in cell Unique!A2:
=unique(sort(indirect("Main!"&substitute(address(1,match(A1,Main!1:1,0),4),"1","")&"2:"&substitute(address(1,match(A1,Main!1:1,0),4),"1","")),1,1))

Link a cell to multiple cells exclude middle range in Google Sheet

I am new to Google sheet functions, Trying to create hyperlink from a cell to multiple cells.
Like
A1 cell in Google sheet should hyperlink to 2 cell range
1. B3:F20
2. I3:L20
I can easily hyperlink a cell to given single range Like B3:F20
using this function
=HYPERLINK("#gid=2&range=B2:F20","Account")
But I am struggling to find a solution to make a hyperlink in a cell to more than one range.
try this:
={HYPERLINK("#gid=2&range=B2:F20", "Account");
HYPERLINK("#gid=2&range=I3:L20", "2ndrange")}

Procedurally Referencing Data Across Multiple Sheet in Google Sheets

I'm trying to dynamically reference data from multiple sheets into multiple cells on one sheet. I'm constantly creating new sheets within the same workbook. I'd like to be able to set it up to where I can easily auto-populate the cells with the data from a new sheet instead of having to rewrite the formula with the new sheet's name.
I'm currently using ='sheetname'!B1 to reference the data from multiple sheets. The problem is when I click and drag the cell to reference a different sheet it changes to ='sheetname'!B2. I've set up the A column with the names of the sheets and tried to figure out a way to reference those as the sheet names but was unsuccessful. Here is a link to a google sheet that shows the problem I'm having:
https://docs.google.com/spreadsheets/d/1lVPemberRSKDcHc3ogz4XE_PTgSAO9IYXx5RCmVQ9C8/edit?usp=sharing
I want the cell B2 in "Totals" to reference A2 as the sheet name and then I want to be able to click and drag so that B3 references A3 as the cell name but doesn't change the cell that it is pulling data from on each of the different sheets.
I actually figured it out. You have to use =INDIRECT("'"&A2&"'!B12"). Way more simple than I thought it was going to be...

How to show range of cells from one sheet in another with formating

I have a document with several sheets.
Each sheet has a range of cells (on the same row, spanning multiple columns) that are specific to that sheet (sheet "description").
I want to make a "table of contents" sheet that shows the name of each sheet and next to it, show the above mentioned range of cells as they are in each sheet.
I've tried with =ARRAYFORMULA(Sheet1!C2:AJ2) and with =IMPORTRANGE("sheet-ID"; "Sheet1!C2:AJ2"), but both of them brin in just the cell data, not their formating.
The formating includes: cell merging, font, background color.
How could I mirror on the "Table of contents" sheet, the "description cell range" of each sheet?"
This is not possible by using formulas. Instead you should use copyTo(Range) or copyTo(destination, options) methods from Google Apps Script.
I know its too late, but for new visitors.
You can use sort function. Simply add a sorted column to your range. Then sort the whole range again on your new sheet by the new column.

TRANSPOSING: How to copy a cell value into the 'Sheet' part of formula

I'm trying to reference the data from another sheet, but I'd like to be able to dynamically specify the Sheet name via a cell within this sheet.
Let's say cell A1 has the text "Sheet 1"
Instead of having my formula say:
=TRANSPOSE('Sheet 1'!F2:F121)
I need to find a way to insert the data from cell A1:
=TRANSPOSE('reference text from A1'!F2:F121)
Is there a way of doing this? I'm working in Google Sheets.
Does this formula work as you want:
=TRANSPOSE(INDIRECT(A1&"!F2:F121"))

Resources