Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Conditional format Excel Cell

Posted on 2016-11-17
3
Medium Priority
?
70 Views
Last Modified: 2016-11-17
I have a spread sheet that I want the font in Cell D to be green when the value in cell A is TODAY and red when the Value is OLDER
0
Comment
Question by:skull52
  • 2
3 Comments
 
LVL 54

Accepted Solution

by:
Ryan Chong earned 2000 total points
ID: 41891605
try this

Cell D to be green when the value in cell A is TODAY
use conditional fomatting formula:
=INDIRECT("$A$"&ROW())=TODAY()

Open in new window


and red when the Value is OLDER
use conditional fomatting formula:
=INDIRECT("$A$"&ROW())<TODAY()

Open in new window

28983745.xlsx
0
 
LVL 34

Expert Comment

by:Rob Henson
ID: 41891685
Why the INDIRECT??? The ROW part will change based on the Active cell so the Formatting will keep changing.

I assume OP means the cell in D of the same row in A, assuming starting in Row 2 with headers in row 1

For Green:
=$A2=TODAY()

For Red:
=$A2<TODAY()

When copied down the reference to row 2 will increase.

What about where date in A is in future, if that scenario can exist in your workbook?

Thanks
Rob H
1
 
LVL 34

Expert Comment

by:Rob Henson
ID: 41891694
EDIT to statement above; I was thinking of CELL("row") which changes with Active Cell. ROW() does give row number of row in which it is placed.

Even so, no need for INDIRECT.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

783 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question