I'm trying to color the header if all of the cells in that column are numbers. Blank or non-numbers should break this.

I have:

custom formula: =ISNUMBER(A3:A)

But it styles the cells instead. Not sure how to specify the header cell within this formula.

2 Answers 2


Apply conditional formatting with custom formula


This can be applied even to a range of headers such as A1:E1; the formula, entered as above, will be interpreted in a relative way for other columns.


  • not(isnumber(...)) is true if the entry is not a number
  • N converts logical true/false to integers 1 or 0
  • sum adds these.
  • arrayformula makes sure the entire range is handled
  • the sum is equal to 0 if all entries are numbers.


Dates and times are considered numbers, because internally, they are. For example, the date 05/26/2016 is the number 42516 formatted as a date.


The way I managed to do this, even though it will be very cumbersome if you have multiple rows that you need to check, is by using the following equation coupled with the Conditional Formatting feature (Format > Conditional Formatting):

=IF(AND (ISNUMBER(n), ISNUMBER(n1), ISNUMBER(n2)), True, False)

Where "n" is whatever cell you're checking.

enter image description here

  • That is unfortunate, and I will test your method, but I do recall reading something about array support in google sheets; is that applicable?
    – user179561
    Commented May 26, 2016 at 19:51
  • I'm not sure about the use of arrays in Google Sheets. They have a good developer portal that might be worth checking out.
    – user108770
    Commented May 27, 2016 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.