Good afternoon Ozgrid community,
I am having an issue with my "function" code when I sort using a macro. Attached is an example with what I mean. In column's H and I you will see a custom formula. Now go to cell b6 and select "John Doe." When you do that all of those formula's become #value. Why is that?
forum.ozgrid.com/index.php?attachment/70233/
Function VBA Help
-
greyangel123 -
September 19, 2016 at 6:51 PM -
Thread is marked as Resolved.
-
-
-
Re: Function VBA Help
Please click the "Attachment 70228" text to open the file
-
Re: Function VBA Help
It's because your workbook doesn't contain the code for a sumbycolor function. I actually see #NAME? rather than #VALUE!
-
Re: Function VBA Help
Try it now
-
Re: Function VBA Help
That works for me.
-
-
Re: Function VBA Help
Quote from StephenR;777705That works for me.
Did you run the macro in B6? The formula keeps reverting to #value and then you have to F2 every cell individually...
-
Re: Function VBA Help
The reason you get #value is because the code is throwing an error. I did try to figure out the logic but failed, miserably.
First step: Add error handling to your function.
That, at least, will warn you when things are not right and perhaps you can begin to resolve it from there.
-
Re: Function VBA Help
Quote from cytop;777707The reason you get #value is because the code is throwing an error. I did try to figure out the logic but failed, miserably.
First step: Add error handling to your function.
That, at least, will warn you when things are not right and perhaps you can begin to resolve it from there.
Ok I found my error before the macro runs turn off automatic formula update and after the macro runs I turn it back on using VBA of course. Thanks for everyone's help!
-
Re: Function VBA Help
OK the reason it worked was that macros had been disabled.
I've tried all sorts of things and nothing has worked.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!