Format from function

  • Thread starter Thread starter adsa
  • Start date Start date
A

adsa

I want my function to format the cell it is coming from. E.g.

Function testfunc()

application.caller.font.name="arial"

End Function

This does not work for me. Any ideas would be welcome.
 
Worksheet functions (or UDFs called from the worksheet) can only return
values to their calling cells, not change format.

To change format, you'll need to use an event macro (e.g.,
Worksheet_Calculate, or Worksheet_Change).
 
You can use Conditional Formatting (Format - Conditional formatting) for
certain formats, based either on the value of the cell or on a formula
(which can examine lots of cells). You get three possible format
conditions. Beyond that, or if you need other formatting, use an event
macro, as JE said.
 
Back
Top