Need VBA Code for Excel Problem?
I'm creating an Excel application and sometimes, because of the figures I put into some of the worksheets, I get the error message "#VALUE!". This isn't a problem because I know why it does it, but rather than have it say "#VALUE!" I'd rather have it say something else, in this case the text string ">50yrs".
Do I need to use VBA code to do this? I can't find a way of doing it just using the formula bar and inputting a formula.
Thanks
-Rob
Re: Need VBA Code for Excel Problem?
If you want to use the formula bar then use an If statement but you will generate a circular reference. So you
may want to use a second column for the actual numbers to display.
Re: Need VBA Code for Excel Problem?
You can use ISERROR on your formula in a IF statement without creating a circular reference.
=IF(ISERROR(A1+B1),">50yrs",A1+B1)
Just replace A1+B1 with whatever your formula is in both places.