Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to specify the formatting in an excel formula?

=IF(A1="Large","This is BIG","This is small")

Where "BIG" is of a font size larger than the text for "small"?

(I'm aware of conditional formatting. That's not what I'm after.)

share|improve this question
up vote 2 down vote accepted

You can make a UDF in VBA that will return the font size

Function FontSize(rCell As Range) As Long
    FontSize = rCell.Font.Size
End Function

But it won't update just because you change the font size - that is changing the font size doesn't cause Excel to recalculate. You could, again using VBA, try to capture all the buttons that change the font size and force a recalc when the user presses them, but...

I think my answer is: there's really no good way to do this.

share|improve this answer

Are you trying to check font size only? This could be impossible I would say.

You could set multiple sizes for font in single cell, so it would be hard to make function that will work well on that.

For checking other infos about single cell there is a CELL function


share|improve this answer
I'm not checking, just trying to set different font values within the equation. I guess calculations only output standard text – Jay May 18 '10 at 7:04
I've never heard of anything like formatting result of formula. The only options could be VBA then if you don't want to use Conditional Formatting. – Cornelius May 20 '10 at 5:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .