Excel 2007 advanced functions?

I need a formula or function that will check a range of dates and then return a color for that cell.
like 0-30 days = white, 30-60 days = amber, 60-90 days = red
ex:
row column A B C
1 | 02/01/2011 | current date | (red colored cell) |

2 | 03/01/2011 | current date | (amber colored cell) |

3 | 04/03/2011 | current date | (white colored cell) |

2011-04-18T03:41:18Z

ok i got to this function:

=IF(H2="done","green",IF(AND(N2<=59,N2>=0),"white", IF(AND(N2>=60, N2<=89),"amber", IF(N2>=90,"red"))))

but now i just need the colors to work. So how can i make the "green","amber",and"red" not just text but actual colors to fill the cells.

General_Payne2011-04-18T07:01:17Z

Favorite Answer

Hi,

You won't be able to change the cell fill via the use of a formula unless you write a user defined function.

The easiest way to do what you're after and link it into the formula you already have is by using conditional formatting (Home Tab>Conditional Formatting). Highlight the range you need then select to add a new rule.

The rule's would be something along the lines of if the cell value equals "red" then fill the cell red; if the cell value equals "amber" then fill the cell amber etc.

Hope this makes sense.

Cheers and let me know if you need anything further.

Erika2016-10-27T08:26:53Z

convinced, yet you want to do yet another table for that - Create a itemizing of unique products in yet another decision of cells (Or sheet) on your get jointly: purple Yellow Blue - Paste SUMIF function interior the subsequent cellular like this =SUMIF( A:A, G1, B:B) Assuming your lengthy vast record is in column A, the values you want to sum in column B and the unique record is in column G - Then Fill that cellular donw to hide all of your values Then do the variety for this new table G and H good success VBAXLMan