0
Thanks

A few words of thanks would be greatly appreciated.

Excel - Color cells for specific days in a month




Issue


I have a spreadsheet that shows how many days a requisition has been open. I would like the words GREEN, YELLOW, and RED to show up in a cell if the req has been open a certain number of days and have no idea how to write that formula out.

So if the record is open less than 30 days then the word GREEN would show up in the cell next to it. If it is open more than 30 days and less than 60 days then YELLOW would show up, and if it is open more than 60 days then RED shows up in the cell next to the number days.

Solution


Assuming its just the number of days in the cell in question and not a date formula then the following formula will fit your needs.

=IF(A1<30,"green",IF(AND(A1>=30)*(A1<60),"yellow","red"))
  • Assuming the days figure are in cell A1. amend to suit your circumstances
  • Then copy the formula down the column in the normal way.

Note


Thanks to sharpman for this tip on the forum.
0
Thanks

A few words of thanks would be greatly appreciated.

Ask a question
Jean-François Pillou

CCM is a leading international tech website. Our content is written in collaboration with IT experts, under the direction of Jeff Pillou, founder of CCM.net. CCM reaches more than 50 million unique visitors per month and is available in 11 languages.

Learn more about the CCM team

Published by . Latest update on by jak58.

This document, titled "Excel - Color cells for specific days in a month," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (https://ccm.net/).

0 Comments