Hello,
I have a workbook where users are required to enter values in Range A2:A1000. If the value entered in the range is less than 100, I'd like the value to be automatically multiplied by 2080 in the exact same cell where it was typed. If, however, the user enters a value greater than or equal to 100, then the value would would be unchanged and would show in the cell exactly as typed.
Here's the code I currently have... could someone please help me to modify it so it can handle the criteria above?
Thanks in advance for your help
~Sean
I have a workbook where users are required to enter values in Range A2:A1000. If the value entered in the range is less than 100, I'd like the value to be automatically multiplied by 2080 in the exact same cell where it was typed. If, however, the user enters a value greater than or equal to 100, then the value would would be unchanged and would show in the cell exactly as typed.
Here's the code I currently have... could someone please help me to modify it so it can handle the criteria above?
Code:
Private changeFlag As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Not changeFlag Then
changeFlag = True
intcolumn = Target.Column
introw = Target.Row
Cells(introw, intcolumn).Value = Cells(introw, intcolumn).Value * 2080
Else
changeFlag = False
End If
End Sub
Thanks in advance for your help
~Sean
Last edited: