I've managed to get VB to create and calculate an 'offer' which will be calculated 4 or 5 times throughout the program. The 'offer' nearly always has a decimal place which i dont need, i just want a whole number returned and preferably rounded up or down to the nearest 100.
I've tried:
VB Code:
offer = CStr(Left$(offer, 2)) & "00"
but this only works with (say) 3,500 but not 35,000 - on the larger numbers it reduces them to 4 figures! but the random offer could be anywhere from 3 figures to 6 figures!
This...
VB Code:
offer = Round(offer - 2)
seems to work a bit better but will not give 'to the nearest 100' results.
any idea how to get the best of both worlds!?


Reply With Quote
