|If you are going to be using this macro, you should understand a little bit about how it works, so that you can make changes to it as required.|
You will note that I used the ROUNDUP function in the macro as follows:
myCell.Value = _
WorksheetFunction.RoundUp(myCell.Value + _
myCell.Value * _
As I'm sure you know, the ROUNDUP function requires 2 arguments:
ROUNDUP( number, digits )
Per the code...
Number --> myCell.Value + myCell.Value * Range("D1").Value
Digits --> 2
Since you don't want to see the 2 decimal digits in your results, I'll leave it up to you to determine what the Digits argument should be. Hint: It's no different than if you were using the ROUNDUP function in a worksheet cell.
Perhaps it would help if you read the following tutorial, which offers some tips and tricks that might help you understand how the macro works. Note: Since the code you are using is a Worksheet_Change macro, you can't really use the steps outlined in the tutorial until you turn it into a "regular macro". That is easily done by simply changing the first line from:
Private Sub Worksheet_Change(ByVal Target As Range)
Here is a link to the tutorial:
message edited by DerbyDad03