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 36 weeks ago
6 years 22 weeks ago
6 years 34 weeks ago
6 years 37 weeks ago
6 years 38 weeks ago
6 years 43 weeks ago
6 years 52 weeks ago
7 years 2 days ago
7 years 3 days ago
7 years 3 days ago