Use of conditional formatting to remind of forthcoming birthdays

A

AndyL82

Hi,
I have a list of birthdays in my Excel spreadsheet. I would like the cell
containing the date to change colour when the birthday is approaching (14
days before the date). To do this I have come up with the following to enter
in the Formula Is box..
=IF(AND(TODAY()-DATE(YEAR(TODAY()),MONTH(A5),DAY(A5))<15,TODAY()-DATE(YEAR(TODAY()),MONTH(A5),DAY(A5))>0))
However, Excel suggests there is an error - any idea what is wrong?
Thanks!!
Andy
 
F

Franz Verga

Nel post *AndyL82* ha scritto:
Hi,
I have a list of birthdays in my Excel spreadsheet. I would like the
cell containing the date to change colour when the birthday is
approaching (14 days before the date). To do this I have come up with
the following to enter in the Formula Is box..
=IF(AND(TODAY()-DATE(YEAR(TODAY()),MONTH(A5),DAY(A5))<15,TODAY()-DATE(YEAR(TODAY()),MONTH(A5),DAY(A5))>0))
However, Excel suggests there is an error - any idea what is wrong?
Thanks!!
Andy

Hi Andy,
put this formula in the Formula Is box:

=AND(TODAY()-DATE(YEAR(TODAY()),MONTH(A15),DAY(A15))<15)

--
Hope I helped you.

I'm not sure of names of menues, option and commands, because
translating from the Italian version of Excel...

Ciao

Franz Verga from Italy
 
F

Fred Smith

Excel is telling you that you've entered an IF function, but haven't completed
it (ie, no true or false result). When using conditional formatting, don't use
IF. Start the formula with AND.
 
F

Franz Verga

Nel post *Franz Verga* ha scritto:
Nel post *AndyL82* ha scritto:


Hi Andy,
put this formula in the Formula Is box:

=AND(TODAY()-DATE(YEAR(TODAY()),MONTH(A15),DAY(A15))<15)


The correct formula is:

=AND(TODAY()-DATE(YEAR(TODAY()),MONTH(A15),DAY(A15))<15,TODAY()-DATE(YEAR(TODAY()),MONTH(A15),DAY(A15))>0)

--
(I'm not sure of names of menues, option and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Ciao

Franz Verga from Italy
 

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

Top