I am trying to write a user defined function that will round a number UP to the nearest 1000. For example, 1786 would round to 2000. I just don't see where the code is going wrong, as it seems logical to me and the math works on paper. Any thoughts/suggestions would be appreciated. Thanks!!
lineSixAmount is a double variable from the main function.
Yes, that was what I intended (my apologies if my use of nearest caused confusion).
Thank you for confirming that my function was working properly, I actually identified the problem as the function call, which I should have included in the original post.