## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ How can I put different background colors in cells of a table?

Information and discussion about graphics, figures & tables in LaTeX documents.
jukaiser
Posts: 1
Joined: Wed Mar 27, 2019 3:46 pm

### How can I put different background colors in cells of a table?

I'm trying to change the background color of some cells that have values above some limit. For example, if the cell value is higher than 2, then the cell background color should be red. I think I'm very close because I can do it when the table only has numbers. The problem is I don't know how to do it when my table has a row with cells that contain text and the others with numbers. I always got the error "Missing number, treated as zero". When I remove the entire roll with text, I can do it perfectly. But I need this rows with text and I only want to change the background color of cells with numbers.

Anyone can help me?

This is my code:
