Need to generate a date if cell is not bold...

M

Max

Hello,

I need to generate a date in cell V2 that is 5 days prior to the date in
cell S2 IF the date in S2 IS NOT bold. (I have conditional formats in S2 that
will bold its date in certain circumstances).

Hope this isnt too confusing. Any help is appreciated.

Regards
Max
 
F

Fred Smith

This will require a macro. Formulas cannot check the format of a cell.

To do it with a formula, simply replicate the same conditions as your
conditional formatting. So V2 would look like:
=if(yourconditions,v2-5,whatever you want when V2 is bold)

Regards,
Fred
 
M

Max

Fred,

I'm afraid I'm not following you. You note that this will require a macro,
as formulas cannot check the format of a cell....then you describe how to do
it with a formula? Seems like a contradiction. Sorry if I'm misunderstanding
you.
 
F

Fred Smith

You asked for a formula to check to see if a cell was bold. This cannot be
done with a formula.

However, there is a workaround. As you are bolding the cell based on a
conditional format, then simply use that formula in the If statement.

For example, supposed your conditional formula is:
=s2>today()

Your If statement would look like:
=if(s2<=today(),s2-5,"whatever you want when S2 is not bold")

Regards,
Fred
 

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