Fill cells based on value

I am looking for a way to fill a number of cells in a row/column based on a particular cell's value. So, if a cells value is say 7 or 3, then 7 cells or 3 cells must be be filled with a particular color.

Thanks in advance

fill cell base on color

Click Conditional formatting > New Rule…
use a formula to determine which cells to format.
=AND(A2>=3,A2<=7)
Choose Format
OK