After apply query I want to change some text color via app script, but my query show this error because I changed data, any ways to solve?
To format I used newRichTextValue()
Ty!
As #player0 mentioned when using Query you need to have free cells depending on the range that your formula will use, otherwise this error will appear:
"Array result was not expanded because it would overwrite data in #range#."
Solution can be either delete the conflicting cell with your query or move the query to a blank row so it can retrieve the data from your query.
Related
Current formula:
=IF(AND(N2>B16,L2>O2),SORTN({L2,N2,O2,Q2},1,0,2,FALSE),"")
Additional Information:
above formula is in cell R2 to have output in R2-U2
L2:Q2 are dynamic and may change one or more times a day
SORTN was how i managed to get the output I wanted but not a requirement
Problem:
I'd like to find a way to log historic values in the R2-U2 range by copying the R2:U2 values downward to R3:U2 and so on when new values are populated into R2:U2. Keeping all the data in descending order from newest to oldest. Is there a non-scripted solution that may be able to accomplish this?
That cannot be done with a spreadsheet formula, because formula results only depend on the source data you give through parameters, and will change dynamically when the source data changes. You cannot use a formula to create static values that remain the same forever to archive those values in the spreadsheet.
In other words, you will need a script. See Apps Script copy row value in History Sheet to first empty row for an example of how to do that.
I am very fresh with Excel and still learning the basics. I came upon an issue I really need help with and couldn't find suitable solution online.
I have a column I keep on constantly updating with Bulk data THE COLUMN.
I'd like to see the most common entry and the least common entry for a specific time using this formula:
=INDEX('Data Input'!F433:F610,MODE(MATCH('Data Input'!F433:F610,'Data Input'!F433:F610,0)))
But once I try it, it constantly tells me:
Did not find value '' in MATCH evaluation.
I've tried with shorter ranges and It did work, so I guess once it runs through empty cell - it breaks. How can I modify this formula to function properly and print what I need?
And side question, is is possible to implement a calendar bar and choose between dates?
You can insert a clause to exclude blanks (assuming they are not to be considered a legitimate return):
=INDEX('Data Input'!F433:F610,MODE(IF('Data Input'!F433:F610<>"",MATCH('Data Input'!F433:F610,'Data Input'!F433:F610,{0,0}))))
Note that I have used
{0,0}
for MATCH's match_type parameter so that the formula will not error should there be more than one entry within your range which shares the highest frequency. In such cases, the above formula will return that which occurs first in your list.
I have a sheet here where I need to use query formula
It doesn't display data that start with ' symbol (strings).
How do I make them display? The red cells are empty.
You mentioned
I have a sheet here where I need to use query formula
You can use the following formula:
=QUERY(ARRAYFORMULA(IF(LEN(A2:A),TEXT(A2:A,0),"")))
(Following that, you can leave the cells as text or change them to numbers depending on their further use.)
Functions used:
QUERY
ArrayFormula
IF
LEN
TEXT
Query considers only one data type for each column. As it is stated in the official documentation:
In case of mixed data types in a single column, the majority data type
determines the data type of the column for query purposes. Minority
data types are considered null values.
Therefore, the solution is to change the format to Plain text for column A.
Result:
You can also convert column to text inside QUERY:
=ArrayFormula(QUERY(TO_TEXT(Sheet1!A2:A),"select *"))
I have a large Google spreadsheet in which I have defined data validation rules. When a cell fails validation, there's a warning displayed (or when using "Reject input", an error message is displayed and it won't even let me enter invalid data, but I don't want to reject input, just show a warning).
Is there a filter or any other way to only show rows that have cells with these warnings in them? Or at least find it somehow so I can keep on "finding next" to go through all invalid cells? Right now, I have to visually scan the entire spreadsheet looking for the little warning icon, and I could be missing a few if I'm scrolling too fast.
I would try using a combination of IFERROR formulas with VLOOKUP then you could set the errors to return a Identifier which you can use with a filter function to pull out all the ERRORS into another table
=IFERROR(VLOOKUP(E3,B$3:C$16,2,False),"N/A")
=FILTER(E3:F16,F3:F16="N/A") v
You can use this spreadsheet for a reference to the idea.
https://docs.google.com/spreadsheets/d/1qczxeJNVlXm_04rK3FE2Sv5PgOapYWv67xOSFxxH5lg/edit?usp=sharing
For the Data range validation this is useful.
"A:A" range contains data validation from "Sheet2!A2:A6"
Global Filter >> Column A >> Custom Formula
=COUNTIF(Sheet2!$A$2:$A$6,A2) < 1
This will filter all data which doesn't match the "Sheet2!A2:A6" range.
Using Google Forms checkboxes to collect survey responses into a Sheets doc, I find that I can only get the values of checked lines to fill the spreadsheet.
I'm trying to get the unchecked CheckBox values to fill a different cell in the spreadsheet as well, has anyone found out a way to do this?
I'd appreciate any help!
I have a way with spreadsheet formulas.
The drawbacks are the necessities of
manual input of all possible options
copying and pasting a formula for each response (can be done in advance, but if not enough formulas are pasted for the number of responses, the sheet will break)
An ideal solution would automatically detect all possible responses, and could theoretically accept an infinite number of responses without breaking and needing maintenance.
With that said, he's an example of what I suggest:
Google Sheet
Google Form
All possible options on the form must be typed into cells A2:A
cells B2:B show comma+spaces if the corresponding cell in A2:A is not blank, with =arrayformula(if(isblank(A2:A),"",", ")). These commas and spaces are needed later in a concatenate().
Raw data from the Form Responses spreadsheet was brought into D2:E with =arrayformula('Form Responses 1'!A2:B)
G2:G holds the important formulas. They must be copied and pasted to each individual cell for each row.
First, all possible responses in $A$2:$B are filtered based on if the cell in column A can be found in the text in column E.
=filter($A$2:$B,arrayformula(iserror(search($A$2:$A,E2))))
Next, some error catching. I added an iferror() to catch a "N/A, no results found in filter evaluation", and an if(isblank(),"",) to catch if no timestamp is in column D meaning no response was recorded in this row.
=if(isblank(D2),"",iferror(filter($A$2:$B,arrayformula(iserror(search($A$2:$A,E2)))),""))
Finally, do a concatenate() to pull the values and the comma+spaces all into one string inside one cell.
=concatenate(if(isblank(D2),"",iferror(filter($A$2:$B,arrayformula(iserror(search($A$2:$A,E2)))),"")))
Oh, and if you don't like the comma+space being the last characters in the string, in J2:J I did a =arrayformula(iferror(left(H2:H,len(H2:H)-2),"")) which cuts off the last 2 characters of the string in column H.
If I come up with a better solution, I'll let you know. It's an interesting puzzle to solve.