Within the strict context of vanilla google sheets, I would like to check if there is a way to dynamically address a Sheet by name.
For instance, if one of my sheets is named "foo's great", I can access it in a formula by the following:
=COUNT('foo''s great'!A2:A500)
Now, let's say I want to stop hardcode the sheet name and want to use a cell containing that sheet name, resolve it to the sheet name, and do my things.
Something along those lines:
=COUNT(EVALUATE_RESOLVE(Z1)!A2:A500)
Where the cell Z1 contains a String, resolving to an existing sheet name within the workbook.
formula would be:
=COUNT(INDIRECT(Z1&"!A2:A500"))
where cell Z1 contains a valid sheet name
Related
I have a Google sheet which has a column for business name (A) and a column for city (B). I would like to set conditional formatting such that if the city name is contained within the business name on the same row, the business name will be highlighted.
list example
Every row contains different business/city data, and there are thousands of rows. I need one formula that will work for the whole sheet.
I know how to do it if the city name and business name are exactly the same =$A$2:$A=$B2, but struggling to figure out how to do it if just a portion matches. Putting an asterisk before $B2 broke the formula.
=REGEXMATCH ($A2,$B2) would do the work too!
Use SEARCH:
=AND(ISNUMBER(SEARCH(TRIM(B2),A2)),B2<>"")
with range starting from A2. You search if A2 contains text from B2 and returns starting number if found. So if it is a number then ISNUMBER returns TRUE
Result:
Im trying to make a google sheet were people can enter in data on their own sheet and have the data recall on the main sheet
enter image description here
Basically everyone will have their own sheet with there name on it and they will enter their name on the main sheet. On main sheet it will call all the data from their sheet. People will enter their name on line 2. I want a code that will take name and find the sheet with their name and call in all the data. I tried using =B2!B3 but google sheets thinks I'm trying to find sheet "B2" and not the name in cell B2. how do I get it to call in the name from cell B2
use INDIRECT:
=INDIRECT(B2&"!"&B3)
B2 being the sheet name and B3 = cell or range
spreadsheet demo
In Google Sheets, I want to grab the text value from a sheet and put it every three rows in a separate sheet. I want there to be blank spaces in the rows in between.
For example, say I have a list of names on a sheet called "Customer Info" In Column A. On a separate sheet, I am keeping track of interactions with customers, and that data takes 3 rows. Every third row, I want to grab the name of the next customer from my sheet "Customer Info" and put it in column A of my sheet "Transactions."
I've been trying to find a way to use something like ='Customer Info'!A(x), and use a formula to get the value of x. I thought some variation of MOD would work.
Say Sheet2 is like:
In Sheet3 cell A1 enter 1 and in A2 enter:
=IF(MOD(ROW(),3)=1,1+MAX($A$1:A1),"")
and copy downwards. In B1 enter:
if(A1="","",index(Sheet2!A:A,A1))
and copy downwards:
You can change the number of empty rows by changing the arguments to MOD().
try:
=INDEX(TRIM(FLATTEN(SPLIT(QUERY(INDIRECT("Customer Info!A2:A"&
COUNTA(A2:A)+ROW(A2)-1)&"♀ ♀ ♀",,9^9), "♀"))))
I am trying to use conditional formatting to compare the value of one cell against another in a dynamically referenced worksheet while using a dynamic cell reference and highlight the cell whenever the values do not match.
I have created a master sheet containing a cell with the name of the worksheet I wish to reference. This cell will be updated periodically with the name of the relevant worksheet. I am able to write a formula that correctly returns the value I wish to compare, but when I enter this expression in the conditional format rule (format cells if is not equal to) I am given a red outline with the message "Invalid formula".
I have tried various combinations such as using a custom formula and using (current cell = (formula here)) and while I am not given an error, it still does not work as intended.
I am comparing the value of cell C2 in worksheet 4719 to cell C2 in worksheet 4717. A cell in a worksheet called Mastersheet contains the entry "4717" in B1, and this is the cell that will be periodically changed to something like 4717 for example.
The formula that is able to successfully return the value I am after is =indirect(Mastersheet!B1&"!"&"C2") but I was only able to accomplish this by putting the "C2" reference in quotation marks, which is not dynamic and thus would have to be manually changed to work for any of the other values in column C.
I expect cell C1 in worksheet 4719 to turn green as the value there is different from cell C1 in worksheet 4718.
I made a publicly viewable copy of my Google sheet if my explanation does not make enough sense https://docs.google.com/spreadsheets/d/1s0oaGas46akmGV7hapnDOdhndcWudyq239kmCrLnt3U/edit?usp=sharing
try it like this:
=INDIRECT(Mastersheet!$B$1&"!"&ADDRESS(ROW(C2), COLUMN(C2), 4))
this can be used in Conditional formatting, however, referenced sheet cant be fully active so:
=INDIRECT(INDIRECT("Mastersheet!B1")&"!"&ADDRESS(ROW(C2),COLUMN(C2),4))
this can be further moded so the B1 would be dynamic too:
=INDIRECT(INDIRECT("Mastersheet!"&ADDRESS(ROW(B1),COLUMN(B1)))&"!"&
ADDRESS(ROW(C2),COLUMN(C2),4))=19
I am new to Google Sheet scripts and attempting to put together something for my business for project management purposes.
On edit, I'm looking to move a row to a new sheet outside the current workbook when a specific name is put in the cell T.
For Example:
if T says "John" - send the entire row to John's Google Sheet by ID
if T says "Amy" - send the entire row Amy's Google Sheet by ID
etc.
You can find an example of the sheet below.
Any and all help is appreciated.
sample spreadsheet
basically, this is the scenario: each of you (you, Amy and John) has own spreadsheet. you as "work assigner" have a master sheet with ID: 11n8TUEiuLLtbyd6ot5imX0zoAOLforHEBnefnHpoZhs (from the example you provided in your question) and all your data are in the sheet called Sheet1 dispersed across the range of cells: A1:AA (also from the example you provided in your question)...
now go to John's spreadsheet and paste this into cell A1:
=QUERY(IMPORTRANGE("11n8TUEiuLLtbyd6ot5imX0zoAOLforHEBnefnHpoZhs", "Sheet1!A1:AA"),
"select * where Col20='John'", 1)
next, go to Amy's spreadsheet and paste this into cell A1:
=QUERY(IMPORTRANGE("11n8TUEiuLLtbyd6ot5imX0zoAOLforHEBnefnHpoZhs", "Sheet1!A1:AA"),
"select * where Col20='Amy'", 1)
note: your spreadsheet can't be private. set permissions to: anyone with link can edit/view