So im making a spreadsheet for fun but I need some help because it would be generous to say my experience is amateur level.
I want to change the color of the cell to the same color if they contain one of a range of different values (all string text)
Example: If cell contains "XXX" or "YYY" or "ZZZ" then colorchange =true, else color = white
I don't really want to have to make separate rules for each string because theres about 80 of them in total
use custom formula:
=REGEXMATCH(A1, "XXX|YYY|ZZZ")
note its case sensitive so to turn off the sensitivity do:
=REGEXMATCH(UPPER(A1), "XXX|YYY|ZZZ")
you can also put your 80 values in a column and use:
=REGEXMATCH(A1, TEXTJOIN("|", 1, Z:Z))
where Z:Z contains all your values
if you want to put those values on a different sheet use:
=REGEXMATCH(A1, TEXTJOIN("|", 1, INDIRECT("Sheet2!Z:Z")))
Related
I'm trying to find a formula that fits two tables
=QUERY(IMPORTHTML(A1,"table", 16), "Select Col4")
output is
Page 1/10Page 2/10Page 3/10Page 4/10Page 5/10Page 6/10Page 7/10Page 8/10Page
9/10Page 10/10
Another:
=QUERY(IMPORTHTML(A2,"table", 16), "Select Col4")
output is
Page 1/3Page 2/3Page 3/3
I want to extract the digits between "space" and "/" Is there a way to do this in this formula itself?
I then tried this
=transpose(SPLIT(REGEXREPLACE(A2,"Page|/10","~"),"~",0,1))
This also doesn't work since I have to manually change /10 to /3 in the second formula
Is there any way to achieve this for both data?
The sheet is here
try:
=ARRAYFORMULA(IF(ROW(A1:B)<=(1*{
REGEXEXTRACT(IMPORTXML(A1, "//option[#value='21']"), "\d+$"),
REGEXEXTRACT(IMPORTXML(B1, "//option[#value='21']"), "\d+$")}),
ROW(A1:B), ))
Here is a table I have created. I just want to make it stand out a little bit.
I have figured out how to make rows different colours. I know how to make an entire row or column bold (column_spec(5:7, bold = T)) but I would like specific cells only based on highest value...so for example in my table, I would like 147 in bold under number, 2.36 under mean....etc
Is there a way of doing this? Using conditional logic would be even better if that was possible - but I can't find how it is done?
Thanks
I figured it out - pretty simple:
test.attempt[1, 5] <- cell_spec(test.attempt[1, 5], "latex", bold = T)
How can I achieve the following:
Sheet1: has a range of cells A1:M13 which have conditional format rules: if text is exactly "1" (to "15" so 15 rules) → each number gives the cell a different background filling.
Sheet2: I want do Conditional Formatting on range A1:M13 based on the cell values in Sheet1!A1:M13.
At the moment I have the following custom formula in conditional formatting:
=if((INDIRECT("Sheet1!A1:M13=1")))
What do I do wrong? Do I have to set format of Sheet1 to value=1 instead of text is exactly "1"?
Apply this to range A1:M13 in Sheet2 for cell to cell comparison:
=1=INDIRECT("Sheet1!"&CELL("address",A1))
try:
=INDIRECT("Sheet1!"&A1)=1
or
=INDIRECT("Sheet1!"&A1)="1"
I have a spreadsheet set up with tv program titles in column B, the next 20 or so columns are tracking different information about that title. I need to count the number of blank cells in column R relating to the range in column B that contains titles (ie, up to the first blank row in column B.)
I can easily set up a formula to count the number of empty cells in a given range in column R, the problem is as I add more titles to the sheet I would have to keep updating the range in the formula [a simple =COUNTIF(R3:R1108, "")]. I've done a little googling of the problem but haven't quite found anything that fits the situation. I thought I would be able to get the following to work but I didn't fully understand what was going on with them and they weren't giving the expected results.
I've tried these formulas:
=ArrayFormula(sum(MIN("B3:B"&MIN(IF((R3:R)>"",ROW(B3:B)-1)))))
=ArrayFormula(sum(INDIRECT("B3:B"&MIN(IF((R3:R)>"",ROW(B3:B)-1)))))
And
=if(SUM(B3:B)="","",SUM(R3:R))
All of the above formulas give "0" as the result. Based on the COUNTIF formula I have set up it should be 840, which is a number I would expect. Currently, there are 1106 rows containing data and 840 is a reasonable number to expect in this situation.
Is this what you're looking for?
=COUNTBLANK(INDIRECT(CONCATENATE("R",3,":R",(3+COUNTA(B3:B)))))
This counts the number of non-blank rows in the B column (starting at B3), and uses that to determine the rows to perform COUNTBLANK in, in column R (starting at R3). CONCATENATE is a way to give it a range by adding strings together, and the INDIRECT allows for the range reference to be a string.
a proper way would be:
=ARRAYFORMULA(COUNTBLANK(INDIRECT(ADDRESS(3, 18, 4)&":"&
ADDRESS(MAX(IF(B3:B<>"", ROW(B3:B), )), 18, 4)))
or shorter:
=ARRAYFORMULA(COUNTBLANK(INDIRECT("R3:"&
ADDRESS(MAX(IF(B3:B<>"", ROW(B3:B), )), 18, 4))))
or shorter:
=ARRAYFORMULA(COUNTBLANK(INDIRECT("R3:R"&MAX(IF(B3:B<>"", ROW(B3:B), ))))
What would the syntax be to conditionally format - if any cell in Column A contains a value that matches any value in Column B then display a blue background?
Looks like this would be done using Conditional Formatting under Format, where this custom formula works.
=OR(A1:A1000="Text Sample 1",A1:A1000="Text Sample 2")
Instead of listing a bunch of values in this formula, is there syntax that can represent values listed in another column (Column B)?
use this custom formula:
=REGEXMATCH(A1, TEXTJOIN("|", 1, B$1:B))
for exact finds use:
=REGEXMATCH(A1, "^"&TEXTJOIN("$|^", 1, B$1:B)&"$")
Custom Formula:
=QUERY(B:B," Select count(B) where B is not null and '"&A1&"' contains B label count(B) ''",0)
Apply to:
A1:A
Queries Column B for every cell in A starting from A1 and outputs count of cells.