发布网友 发布时间:2023-09-22 17:30
共2个回答
热心网友 时间:2023-10-19 10:07
用instr函数,len函数,left函数,right函数等组合起来热心网友 时间:2023-10-19 10:07
F=8.4$W=8.3$Y=7.1$追答
Dim t, a, b, i, myStr As String
For t = 1 To 18
myStr = Cells(t, 1)
a = InStr(1, myStr, "Y=")
If a > 0 Then
b = InStr(a + 2, myStr, "$")
If b > a Then
i = Trim(Mid(myStr, a + 2, b - a - 2))
Debug.Print i
ElseIf b = 0 Then
i = Trim(Mid(myStr, a + 2))
Debug.Print i
End If
End If
Next t
End Sub