Hello
I am have a sheet that I enter large numbers eg 500,000 etc and to reduce typing zeros, I would like cells E9, E37 and E40 to be multiplied by 1000 on cell change. I can implement this with a single sub but when adding in additional subs I get an error. I have looked extensively to fix this and done much testing but require your assistance please. Can the below all be combined in to a single sub?
Thanks
I am have a sheet that I enter large numbers eg 500,000 etc and to reduce typing zeros, I would like cells E9, E37 and E40 to be multiplied by 1000 on cell change. I can implement this with a single sub but when adding in additional subs I get an error. I have looked extensively to fix this and done much testing but require your assistance please. Can the below all be combined in to a single sub?
VBA Code:
Sub Worksheet_Change(ByVal Purchase As Range)
Application.EnableEvents = False
If Purchase.Address = "$E$9" Then
Purchase = Purchase * 1000
Application.EnableEvents = True
End If
End Sub
Sub Worksheet_Change(ByVal LotA As Range)
Application.EnableEvents = False
If LotA.Address = "$E$37" Then
LotA = LotA * 1000
Application.EnableEvents = True
End If
End Sub
Sub Worksheet_Change(ByVal LotB As Range)
Application.EnableEvents = False
If LotB.Address = "$E$40" Then
LotB = LotB * 1000
Application.EnableEvents = True
End If
End Sub
Thanks