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 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago