Vba excel custom function not updating Online xxx cyber chats
They cannot be used to try and change any part of another cell in any way at all.
This means a UDF cannot place a value into any other cell except the cell housing the UDF.
Although Excel has over 300 built in functions, there are those times when you cannot achieve the result you want with a standard Function or you must get your result by creating a deeply nested formula using a combination of standard functions.
Example: This function should always return the value in 'A2' Changes) are not considered events worthwhile a recalculation in Excel. Therefore, any format change will not result in a recalculation.
By accident I discovered that including indirect cell reference in the function call appears to make it run whenever (seemingly) any other cell is edited.
Presumably this is because excel has fewer guarantees about what it can trust to be unmodified when an indirect modifier is used.
A UDF cannot alter the structure of a Worksheet, such as changing the Worksheet name, turning off gridlines, protecting the Worksheet etc.
They cannot change a physical characteristic of a cell, including the one that houses the UDF, so we cannot use a UDF to change the font colour, background colour etc of any cell.