Posts

Showing posts with the label Google Sheets Formula

Count Cells That Contain Any Text

Answer : You can pass "<>" (including the quotes) as the parameter for criteria . This basically says, as long as its not empty/blank, count it. I believe this is what you want. =COUNTIF(A1:A10, "<>") Otherwise you can use CountA as Scott suggests COUNTIF function will only count cells that contain numbers in your specified range. COUNTA(range) will count all values in the list of arguments. Text entries and numbers are counted, even when they contain an empty string of length 0. Example: Function in A7 =COUNTA(A1:A6) Range: A1 a A2 b A3 banana A4 42 A5 A6 A7 4 -> result Google spreadsheet function list contains a list of all available functions for future reference https://support.google.com/drive/table/25273?hl=en. The criterium should be "?*" and not "<>" because the latter will also count formulas that contain empty results, like "" So the simplest formula would be =COUNTIF(Range,"?*")

Conditional Formatting Based On Another Cell's Value

Image
Answer : Note: when it says "B5" in the explanation below, it actually means "B{current_row}", so for C5 it's B5, for C6 it's B6 and so on. Unless you specify B B B 5 - then you refer to one specific cell. This is supported in Google Sheets as of 2015: https://support.google.com/drive/answer/78413#formulas In your case, you will need to set conditional formatting on B5. Use the " Custom formula is " option and set it to =B5>0.8*C5 . set the " Range " option to B5 . set the desired color You can repeat this process to add more colors for the background or text or a color scale. Even better, make a single rule apply to all rows by using ranges in " Range ". Example assuming the first row is a header: On B2 conditional formatting, set the " Custom formula is " to =B2>0.8*C2 . set the " Range " option to B2:B . set the desired color Will be like the previous example but works on all rows, not just row 5...