The HTML rendering on the blog is sometimes not very good, so here is a screenshot of the VBA window (click on the picture to see a full sized version).
Option Explicit
Private Const MIN_VAR_PERCENT As Double = -0.15
Private Const MAX_VAR_PERCENT As Double = 0.1
Sub AdjustTargets()
Dim oRange As Range
Dim oCell As Range
Dim vNumber As Variant
Dim iPlaces As Integer
''' use the selected cells
Set oRange = Selection
''' loop the selected cells
For Each oCell In oRange
''' if the cell contains a number
If IsNumeric(oCell.Formula) Then
''' grab the number
vNumber = oCell.Formula
''' get the number of decimal places
If InStr(CStr(vNumber), ".") > 0 Then
iPlaces = Len(CStr(vNumber)) - InStr(CStr(vNumber), ".")
Else
iPlaces = 0
End If
''' compute a random value between the bounds and
oCell.Formula = Round((vNumber * (1 + MIN_VAR_PERCENT)) + (Rnd() * (MAX_VAR_PERCENT - MIN_VAR_PERCENT)) * vNumber, iPlaces)
End If
Next
End Sub
To use the VBA, select a range in an Excel workbook and run the macro.