excel vba help plz

C

chavicide

i wont to make an if statment in vba for excel that will if y
circumstances are met will minus x from a specific cell once only
 
Z

Zack Barresse

Hi there,

Not sure what you're talking about here, but maybe something like this ...


Public blnRan as boolean

Sub Testing()
Dim rngCalc as range
Set rngCalc = Workbooks("Book1.xls").Sheets("Sheet1").Range("A1").Value
If y = "met" Then
If blnRan = False Then
rngCalc = rngCalc.Value - x
blnRan = True
End If
End If
End Sub


HTH
 
Top