I am building a trading report that returns for me the amount of shares needed to sell to meet a certain cash amount.
What I would like to do, is take the number of shares I have calculated to sell, and round them to the nearest:
If (heldshares) is between 1 and 10 then round to nearest 1
If (heldshares) is between 11 and 50 then round to nearest 5
If (heldshares) is between 51 and 100 then round to nearest 10
If (heldshares) is between 101 and 500 then round to nearest 25
If (heldshares) is between 501 and 750 then round to nearest 50
and so on... not sure why this is stumping me...
Thank you for any assistance!!