Count the number of occurrences of a value on a multi-page spreadsheet - google-sheets

The spreadsheet has many pages and more pages will be added in the future and I don't know the names of these future added. I can't just do:
=countif(Tab1!A:Z,Value1)+countif(Tab2!A:Z,Value1)+countif(Tab3!A:Z,Value1)...
because I don't know the names of these tabs to be added.
Is there a way to count the occurrences on new sheets without explicitly adding them in such a formula?

It seems that this can not be achieved using a formula. It must be written as a script. You can see an example at this question: COUNTIF Statements: Range Across All Sheets + Cell Reference as Criterion

I'm not sure if what you're trying to do is possible. But, I can help you with the getting the spreadsheet pages/sheets name part.
By using this sheets projection:
https://spreadsheets.google.com/feeds/worksheets/{spreadsheetId}/public/basic
you'll be able to get the list of all spreadsheet pages in xml format.

Related

How can I concatenate and transpose two ranges of cells in Google Sheets?

I have a Google Form linked to a Google Sheet. It has a number of questions with responses that I need grouped into specific columns. I also need to keep the columns in the order they're in.
I was working with a formula someone helped me with to do one single range:
=ARRAYFORMULA({"Job Responsibilities";IF(A2:A="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(H2:V),,100))))})
However in the instance I am having problems, I need to group together the answers that are in columns W - AK and also BA - BO into one cell.
I tried something like
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(W2:AK)TRANSPOSE(BA2:BO),,100))))})
or
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY(TRANSPOSE(W2:AK, BA2:BO),,100))))})
But that makes an error.
Is there another modification I can make to concatenate and transpose the values in these cells?
Here is a link to a Google Sheet showing most of what I'm referring to. It's from an earlier iteration, so it's not 100% exact with what I said above, but the goal is still the same. In this Sheet, I would like to concatenate what's in Columns U - AG and AU - BF.
Update, based on the data in your sheet:
=ARRAYFORMULA({"Supporting SAP Stream";IF(B2:B="",,TRIM(TRANSPOSE(QUERY({TRANSPOSE(U2:AG);TRANSPOSE(AU2:BG)},,100))))})
Try:
=ARRAYFORMULA({"Supporting SAP Stream";IF(!B2:B="",,TRIM(TRANSPOSE(QUERY({TRANSPOSE(W2:AK); TRANSPOSE(BA2:BO)},,100))))})

Can I make Google Sheets evaluate a string input as if it were a formula?

I am creating a home budget for myself in Google Sheets, working in Chrome on Windows 10. In the end, the budget will be composed of separate sheets for each month, containing tables for each Friday (payday) within that month. All such tables will follow a certain format and will pull arrays of budget data from an auxiliary sheet.
However, trial-and-error (mostly error) is abundant, and one quails at the thought of having to paste corrections across 52 tables. Is there any way to have each table emulate a formula set down in a template? For example, ideally, my template would contain something like:
=INDEX(IF(condition(relativeCell),namedRange1,namedRange2)
and the final product would pull that formula (with relative reference) to each table. If I discover a mistake or need to make a change, I can simply change the template, and all of the live tables would update their formulas.
Can this be done in Google Sheets?
Failing that, I already have a function that returns a cell's formula as string text. Can this be used to get the desired effect?
there is a formula called INDIRECT which does exactly that:
https://support.google.com/docs/answer/3093377?hl=en

Google Spreadsheet - VLookup Values From Another Workbook

I have a huge year of data and I cannot add it in 1 spreadsheet because of the limitation on the number of cells per workbook/spreadsheet so I separated the huge data into multiple files by month (January, February, March etc).
In my master file/spreadsheet I needed to use a formula to lookup some values from the master spreadsheet and the problem is that the tables to look into are now in multiple monthly spreadsheets. What is the best formula to look up values in multiple spreadsheets?
After googling for a while I don't have much options, I don't even know what the formula is for using Vlookup to find values in a separate spreadsheet instead of another tab. I tried importrange and it seem to still use the limit even though it's in a different spreadsheet I get error when trying to use it because the data is too large.
So you can use IMPORTRANGE to get the columns needed for the vlookup.
=VLOOKUP(D42,IMPORTRANGE("https://docs.google.com/spreadsheets/d/[sheet_id]","Sheet1!D:ZZ"),1,0)
It's not clear if you added the permission needed to access the other workbook when you use IMPORTRANGE
like this
You can also use IMPORTRANGE in the data parameter QUERY(data, query, [headers])
QUERY is awesome when you know your way around SQL. Google Visualization API Query Language

Google Sheets Custom conditional formatting multiple conditions

I made a spreadsheet in google sheets in my last company which highlighted all my rows based on my qualifying conditions. I can't remember what conditional formatting I used.
I have tried the =IFAND and =AND functions along with others.
This is what I am trying to do:
If column B says DTC, even if something else is also in cell, and the dates are between two ranges I want it highlighted. Then I will have multiple rules that vary in dates and words. I have attached a new demo sheet to help.
https://docs.google.com/spreadsheets/d/1yX_Ohfdz0uRKvOB8hvOpcO2sb5dSaAP6Zw-aR_HzK2E/edit?usp=sharing
The formula I have in there now is =AND($B2="DTC",E$2>=DATE(2017,10,1),E$2<=DATE(2018,10,1))
To find both DTC and DTC-DCL with a wildcard try using if with search like this:
=if(and(search("DTC*",$B2),$E2>=date(2017,10,1),$E2<=date(2018,10,1)),"true","false")

Check cell for multiple strings and return specific values

I'm trying to create a Google Sheet formula that searches for a word in a longer string and returns a specific value based on the string being searched.
I can achieve this in Excel but I need this to work in Google Sheets.
Below is an example of what I'm trying to achieve:
The "Sort" column is retrieving the value based on checking if the word in column "C" exists in column "A".
I've tried using wildcard search but this isn't working for me in Google Sheets, and other examples I've seen online don't seem to allow me to return multiple values.
Any help would be much appreciated.
This formula may fit you:
=IFERROR(REGEXEXTRACT(A1,JOIN("|",FILTER(C:C,C:C<>""))),"none")
Here're some useful links:
REGEXEXTRACT
JOIN
FILTER

Resources