Initialising no of licenses to 0
dim transientLicense AS integer
transientLicense=0
dim steadyLicense AS integer
steadyLicense=0
dim staticLicense AS integer
staticLicense=0
Checking conditions
if( (value.cell(AH) =("radial vibration" or "acceleration" or "acceleration2" or "velocity" or "velocity2")) && (value.cell(W)="yes") && (value.cell(D)="active") Then
transientLicense++
else if( (value.cell(AH) =("radial vibration" or "acceleration" or "acceleration2" or "velocity" or "velocity2")) && (value.cell(W)="no") && (value.cell(D)="active") Then
steadyLicense++
else if((value.cell(AH)=("axial vibration" or "temperature" or "pressure") && (value.cell(D)="active")) Then
staticLicense++
how do I write this in proper vba syntax
You should try such way
edit to add a
WorkSheetFunction.CountIF()
optionyou could go two ways:
AutoFilter()
optionthe only requirement being row 1 must have headers
WorkSheetFunction.CountIF()
option