ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Conditional format row by column date (https://www.excelbanter.com/excel-discussion-misc-queries/244012-conditional-format-row-column-date.html)

PhilosophersSage

Conditional format row by column date
 
I need to conditional format a row based on whither a column (E, G, or K) has
a date (not text or number) is there a way to do this? I can get based on
blank, or number but not just date.

Jacob Skaria

Conditional format row by column date
 
The below should point you in the right direction. Select rows to be
formatted and use the below CF formula which would check whether the year
returned from the cell is above 1975 and less than 2050....Please note that
this can only be used if you are sure if the numbers in your range are not
more than 27759. Since excel stores date as numbers a number like 27760 is
treated as 1/1/1976..

=OR(AND(YEAR($E1)1975,YEAR($E1)<2050),AND(YEAR($G 1)1975,YEAR($G1)<2050),AND(YEAR($K1)1975,YEAR($K 1)<2050))

PS: Refer help on CELL(info_type,reference) if you are looking for cell
format..


If this post helps click Yes
---------------
Jacob Skaria


"PhilosophersSage" wrote:

I need to conditional format a row based on whither a column (E, G, or K) has
a date (not text or number) is there a way to do this? I can get based on
blank, or number but not just date.


PhilosophersSage

Conditional format row by column date
 
the AND(YEAR($E1)1975,YEAR($E1)<2050) returns #VALUE if there is text or
blank but using the CELL("format", E1) then doing a logic function if D4 came
out correct. Thanks for putting me on the right track.


"Jacob Skaria" wrote:

The below should point you in the right direction. Select rows to be
formatted and use the below CF formula which would check whether the year
returned from the cell is above 1975 and less than 2050....Please note that
this can only be used if you are sure if the numbers in your range are not
more than 27759. Since excel stores date as numbers a number like 27760 is
treated as 1/1/1976..

=OR(AND(YEAR($E1)1975,YEAR($E1)<2050),AND(YEAR($G 1)1975,YEAR($G1)<2050),AND(YEAR($K1)1975,YEAR($K 1)<2050))

PS: Refer help on CELL(info_type,reference) if you are looking for cell
format..


If this post helps click Yes
---------------
Jacob Skaria


"PhilosophersSage" wrote:

I need to conditional format a row based on whither a column (E, G, or K) has
a date (not text or number) is there a way to do this? I can get based on
blank, or number but not just date.



All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com