Option Explicit
Dim i
Dim n
For i=1 To 10
If i < 10 then
n = CNo("speed0" & i)
Else
n = CNo("speed" & i)
End If
If n > 0 Then
If i < 10 then
ChnName(n) = "velocitiy0" & i
Else
ChnName(n) = "velocitiy" & i
End If
End If
Next
assuming you have a fixed list of name pairs this script will help:
Option Explicit
Dim i
Dim n
Dim SourceNames
Dim DestNames
SourceNames = Array("AC", "PS", "DS" )
DestNames = Array("Acceleration", "Pressure", "Displacement" )
For i=0 To UBound(SourceNames)
n = CNo(SourceNames(i))
If n > 0 Then
ChnName(n) = DestNames(i)
End If
Next