Forum Discussion

Arnold Schwartz's avatar
Arnold Schwartz
Copper Contributor
Nov 26, 2017

Conditional Formatting to Distinguish Between Labels and Numbers

This is my first post and first day of membership in this community. I have a data set, where the cells contain either labels (text), numbers, and blank cells. I want to conditionally format each cell, so that the text is yellow, the numbers are blue, and the blank cells are green. I tried by setting up a new rule under conditional formatting, then selecting "use a formula to determine which cells to format", then using some combinations of the if, istext, isnumber, etc. combinations. Please advise. Note that when I apply the first rule, say using the istext function, it does highlight the cells with text strings as yellow, but it also highlights the numbers in that range of cells as yellow ... I haven't gotten to rule #2 for Green until I can solve the first rule's failure in highlighting. Please advise.

 

Also, as I way, I'm new to this site. Will I receive an email, if the scenario gets solved? How do I use "Add Tags" for future posting and how does that work?

 

 

  • Arnold Schwartz's avatar
    Arnold Schwartz
    Copper Contributor
    OK. I solved this. I applied a conditional formatting formula "=istext(cell reference)" to the active cell in the data set, and supplied a color format. Then I copied the format from the active cell to the rest of the data set. Then, I applied the "isnumber(cell reference)" to the same active cell, and supplied a different color fill to that cell; then, similarly, I copied that cell format to the rest of the data set as well. So, I had two different rules, and this worked. I noticed that the cell reference when I started was a relative reference, and I ended up with fully absolute references once the formula and conditional formatting was completed ... I'm still working on figuring that out ... but, as I say, it all works now.

Resources