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

  • Thread starter Thread starter Max
  • Start date Start date
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
 
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
 
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.
 
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
 
Back
Top