I have a user defined function in Excel. It is called as a formula function from spreadsheet cells and works fine.
I\'d like the function to be able to change the ce
This cannot be done. User defined functions cannot change the state of the workbook/worksheet etc.
Use Conditional Formatting to achieve what you are trying.
EDIT: This is more of a suggestion, not a real answer.