Simple Math calcualtion using VBA programming
Hi Friends,
Iam quiet new to VBA programming,requesting for help
Iam performing simple math calculation using VBA prog
CTN QNTY CTN OUT CTN AVAILABLE
30 5 25
CTNAVAILABLE= CTNOUT - CTNQNTY
I want to implement a constraint
if ctnout is greater than equals ctqnty then
make ctnqnty=0 and ctn out=0.
currently am implementing the following code
Public CellCopy As Variant
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("L:L")) Is Nothing Then Exit Sub
Application.EnableEvents = False
On Error GoTo ErrorRoutine
Target = Target + CellCopy
ErrorRoutine:
Application.EnableEvents = True
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("L:L")) Is Nothing Then Exit Sub
CellCopy = Target
End Sub
Kindly update me with your answers as soon as possible.
thanks
Recent comments
5 years 44 weeks ago
6 years 30 weeks ago
6 years 42 weeks ago
6 years 44 weeks ago
6 years 46 weeks ago
6 years 51 weeks ago
7 years 7 weeks ago
7 years 7 weeks ago
7 years 8 weeks ago
7 years 8 weeks ago