I have a cell who's format I've defined in a sub as a percentage and the values I type manually into the cell are automatically formatted to percentages. However, I also have a function that returns a value and when I run the function in that cell the value it returns doesn't update as a percentage even if I manually select "Percentage" as the format for that value.
The function I'm using is designed to return a range of different data types (e.g. Currency's, Dates, Percentages, Values, Strings) so I'm using Variant as the return type for the function.
Is there a way that I can ensure the function respects the format of the cell?
Bookmarks