set formatting without using Conditional Formatting

  • Thread starter Thread starter Chris T-M
  • Start date Start date
C

Chris T-M

I'm trying to set formatting with a function, and not with conditional
formatting.

=IF(A1>0,A1,B1)

What I want

=IF(A1>0,A1 [font on bold blue],B1 [font in black])

I realize that this could be done with Conditional Formatting, but the
actual function is significantly more complex.

Any solutions or "Can't be done" are welcome.
 
Conditional formatting, manual formatting, or VBA code are your 3 choices.
Formulas alone cannot set formatting attributes.

Oh, there is a 4th choice: using color codes in your numeric formatting
strings, e.g. [red]
 
I'm not sure what you mean by
"...using color codes in your numeric formatting strings, e.g. [red]"
Would you provide a simple code example?


Duke Carey said:
Conditional formatting, manual formatting, or VBA code are your 3 choices.
Formulas alone cannot set formatting attributes.

Oh, there is a 4th choice: using color codes in your numeric formatting
strings, e.g. [red]

Chris T-M said:
I'm trying to set formatting with a function, and not with conditional
formatting.

=IF(A1>0,A1,B1)

What I want

=IF(A1>0,A1 [font on bold blue],B1 [font in black])

I realize that this could be done with Conditional Formatting, but the
actual function is significantly more complex.

Any solutions or "Can't be done" are welcome.
 
Oh, there is a 4th choice: using color codes in your numeric formatting
strings, e.g. [red]

I thought that didn't work? I could swear I've tried before, and
failed.
 
See John McGimpsey's site for custom formatting up to 6 colors.

http://www.mcgimpsey.com/excel/conditional6.html


Gord Dibben MS Excel MVP

I'm not sure what you mean by
"...using color codes in your numeric formatting strings, e.g. [red]"
Would you provide a simple code example?


Duke Carey said:
Conditional formatting, manual formatting, or VBA code are your 3 choices.
Formulas alone cannot set formatting attributes.

Oh, there is a 4th choice: using color codes in your numeric formatting
strings, e.g. [red]

Chris T-M said:
I'm trying to set formatting with a function, and not with conditional
formatting.

=IF(A1>0,A1,B1)

What I want

=IF(A1>0,A1 [font on bold blue],B1 [font in black])

I realize that this could be done with Conditional Formatting, but the
actual function is significantly more complex.

Any solutions or "Can't be done" are welcome.
 
Back
Top