2个回答
展开全部
假设你要在单元格["A1:C3"]中找“A”
sub main
dim A的数量%
A的数量=strtotal(range(cells(1,1),cells(3,3)),“A”)
msgbox A的数量
end sub
function strtotal(rng as range,str$)
dim acell as range, astr$,strary() as string
for each acell in rng
astr=astr & cstr(acell.value)
next acell
strary=split(astr,str)
strtotal=ubound(strary())
end function
sub main
dim A的数量%
A的数量=strtotal(range(cells(1,1),cells(3,3)),“A”)
msgbox A的数量
end sub
function strtotal(rng as range,str$)
dim acell as range, astr$,strary() as string
for each acell in rng
astr=astr & cstr(acell.value)
next acell
strary=split(astr,str)
strtotal=ubound(strary())
end function
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询