How to create an "IF - THEN" macro

  • Thread starter Thread starter TXNDe
  • Start date Start date
T

TXNDe

Is there a way to create a macro that will highlight a range, fill it
with color and change the font color upon entering a date into a
specific cell?
Example below shows how I have my headings. I want to create a macro
that once I type a date in cell "F1" (date closed) that it will
highlight range "A1-F1" fill in the range with a light yellow and gray
the text.

Company Fname Lname Date Recvd Date Due Date Closed

Any help would be greatly appreciated.

Thank you.
 
Someone will come in with a fancy formula to check for a date, but if the
cell is blank and you just want to colour the font and cell when something
is entered then select A1:F1 and go to Format<conditional formatting... set
'formula is' and enter =NOT(ISBLANK($F1))

Now when the cell contains an entry in F1 it will colour it up

You can use the format painter to copy it to other rows

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 
as Nick says it will wok you can also grey the text

=LEFT(CELL("format",F1),1)="d" as a formula in conditional formating
may also work looking for a date format

Regards

Dav
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top