set cell format in user function

G

glenne

I want to write a VB function that will perform some calculations an
return a value...no problem, I can do this.

But I also want to set the cell formating (cell color ) based on som
of the calculations done within the function. I want to set th
formatting for the cell in which the function resides. In otherwords
I want to enter the function in, say, cell A3, and based on th
calculations within the function, change the color of cell A3

The main thing I don't understand is how to reference the cell in whic
the function resides. This isn't the cell currently selected (clicke
on)...its the cell that storing the function.

I guess this is a more advanced sort of conditional formatting. A
part of this function, I'd imagine I'd need to somehow override th
formating that is, or will be set, using the Excel menu.

Thanks!
Glen
 
V

Vasant Nanavati

Unfortunately, a function called from a worksheet cannot make any formatting
changes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top