I have written a user defined function and am having two issues. The function works fine when x is an even integer but returns #VALUE! when x is an odd integer. I am thinking the issue is with the way I am using my If statements, but I am not sure. My second issue is that I want the value to x to be a value that is pulled from a cell on another sheet. I am confused on how to do this, not sure if I ned to write a sub function or if there is some existing code within VBA that will allow me to do this.
Here is my code:
Please Login or Register to view this content.
Bookmarks