D T*_*D T 1 excel vba excel-vba
strText = oSheet.Cells(1, 1).Text
If InStr(strText, "\") > 0 Then
bPrice = True
End If
Run Code Online (Sandbox Code Playgroud)
如何检查字符串中是否存在"\"?
小智 5
该¥是ASCII 165(分解).尝试,
strText = oSheet.Cells(1, 1).Text
If cbool(InStr(1, strText, ChrW(165))) Then
bPrice = True
End If
Run Code Online (Sandbox Code Playgroud)
这是一个测试,以确保您获得正确的ASCII十进制代码.根据您的喜好格式化单元格,选择它并运行此短子.
sub find165()
dim str as string, i as long
str = activecell.text
for i = 1 to len(str)
debug.print ascw(mid(str, i, 1))
next i
end sub
Run Code Online (Sandbox Code Playgroud)
查看VBE的立即窗口,查看单元格中显示的每个字符的ASCII dec代码.
归档时间: |
|
查看次数: |
61 次 |
最近记录: |