AutoClave
AutoClave

Reputation: 1

excel can VBA UDF output formatted text?

Is there a way to return a string from an UDF formatted? For example I would like first two words to be bold, the rest not.

Upvotes: 0

Views: 920

Answers (2)

Gaijinhunter
Gaijinhunter

Reputation: 14685

Functions are not allowed to alter the formatting of the worksheet. That being said, Sub() can and you can easily write a Sub routine that does this - it just means you'll have to run the macro (like using F8) instead of entering it as a formula inside a cell.

Upvotes: 2

abcde123483
abcde123483

Reputation: 3905

Sorry, but you can't apply rich text formatting to the result of a formula.

Upvotes: 0

Related Questions