Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format excel row using date function.

Status
Not open for further replies.

Conner

Technical User
Nov 29, 2000
44
0
0
US
Have a range of cells, all in a row. The first column contains the month and year "mmm/yyyy". IF it can be done, need a function that will automatically change the color of the font in each cell of the row from black to red when that month "gets here," as in Now().
 
Highlite all of the cells in question...

then from menu use conditional formatting

Format>conditional formatting..

change the left drop down to "formula is"

then in the box to the right type:

=if(month(a1)=month(now()),true,false)

set the format by clicking the format button

then ok
 
Note: I assumed A1 is the first column...as in =if(month(a1)=month(now()),true,false)


alter that to reflect your left most dates address if needed
 
Your solution is closer to what I need than any I have yet been able to develop; however, what happens is that the conditional format "changes" the font color for ALL months that have passed before September (the month that is "now" as of today) regardless of the year....how do I conditionally format so that I get both month and year considered...

 
are your range of cells formatted as date?
 
Im thinking you need to format the date to display mmm/yyyy
and actually place 1/1/04,2/1/04,3/1/04 ...etc. in the cells respectivley
 
Or if you format as gerneral
and actually type Jan/2004 in the first cell and fill across, excel will custom format the date automatically.

then you can set your conditional format using the formula above, being sure to change the "A1" ref. if applicable.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top