You can test your code/functions in the immediate window (press Ctrl+G) and enter the function with some sample values
?ReturnData(1, 50000, 25000, 1000, 2500)
This will run your code and return the results. Play with a variety of different values/scenarios to confirm all possibilities. You can...