I've been building a workbook to do Quotes/Purchase Orders/Order Confirmations..etc. I have a macro which gives a pop up window to enter a price percentage discount/increase. It works fine and shows the amount discounted/increased into the active cell. However, even though clients love seeing the discount number...sometimes we end up increasing the price due to whatever the circumstances may be, and we do not want them to see that. Is there a way to have this macro show the number if its negative, and leave it blank if its 0 or posetive (but still apply the price increase)...? Any guidance would be great, here is what i have working right now.
Sub Disount()
Dim Ans As String
Dim AkMsg As Variant
Dim Sum, Ans2 As Single
ActiveCell.FormulaR1C1 = "=SUM(R[-13]C:R[-1]C)"
Sum = ActiveCell.Value
Ans = InputBox("Discount Amount") 'the user will enter a number (percentage), i need the user to enter only a number and macro to add "%" behind it.
If StrPtr(Ans) = 0 Or Ans = "" Then 'if the user cancel or didnot enter a number this is what macro does
Exit Sub
Else
Range("F30").Select
ActiveCell.Value = -(Sum * (Val(Ans) / 100)) '
End If
End Sub
Sub Disount()
Dim Ans As String
Dim AkMsg As Variant
Dim Sum, Ans2 As Single
ActiveCell.FormulaR1C1 = "=SUM(R[-13]C:R[-1]C)"
Sum = ActiveCell.Value
Ans = InputBox("Discount Amount") 'the user will enter a number (percentage), i need the user to enter only a number and macro to add "%" behind it.
If StrPtr(Ans) = 0 Or Ans = "" Then 'if the user cancel or didnot enter a number this is what macro does
Exit Sub
Else
Range("F30").Select
ActiveCell.Value = -(Sum * (Val(Ans) / 100)) '
End If
End Sub