VBA基础
获取字符串中特定字符的个数
2005-02-04 10:15:52
的方法 :Public Function CSNumber(myStr as String,myLetter as String) as integerdim I as integer,J as integerJ=0for I = 1 to Len(myStr) if MID(myStr,I,1)=myLetter  then  J=J+1  End if NextCSNumber=JEnd Function相关论坛贴子: http://www.office-cn.net/bbs/dispbbs.asp?boardid=2&id=21901情比金坚的方法 strc = Len(name1) - Len(Replace(name1, ",", ""))

-------------------------------------------收集于Office中国论坛