In column A, I am entering 5-digit SKU numbers (e.g., 94510). In column B, I'm entering an order quantity. The SKU numbers in Column A have multiples that they can be ordered in. For example, if I enter SKU # 94510, I can only order that SKU in multiples of 30. However, if I order SKU #12345, I can only order that in multiples of 36. So, here's the more complicated question I should have asked in the first place.

I want to fill in the corresponding number of cells to the right with the color blue based on the order quantity. For example, if I order 30 cases of SKU #94510 (94510 is in A1, and 30 is in B1), then I want 1 cell C1 to fill with the color blue. If I order 60 cases of the same SKU, then I would want 2 cells (C1 & D1) to be filled with blue. Jacob's answer below does a great job of answering this question. But what if I change the SKU to a number that can only be ordered in multiples of 36? Obviously, I would want 1 cell filled in for every multiple of 36. There are of course different multiples for different SKU's. I have already set up a table that references what multiples are assigned to what SKU. Any help is greatly appreciated.

************************************

Is there a way to fill a cell with color based on a condition in another cell?

For example, if I enter the number 30 in cell A1, I would like cell A2 to fill with the color blue. However, if I enter the number 60 in cell A1, I would like cell A2 and cell A3 to fill with blue. The number in cell A1 will always be a multiple of 30, so obviously, for every multiple of 30 that I enter into cell A1, I would want the corresponding number of cells to be filled in to the right. (90 = 3 cells, 120 = 4 cells, etc.)

************************

Select A2 and then goto Format | Conditional Format

Select "Formula Is" and input

=IF($A$1>=30*(ROW(A1)),TRUE,FALSE)

Drag A2 down for as many cells as you want to be conditionally formatted.