所有栏目 | 云社区 美国云服务器[国内云主机商]
你的位置:首页 > 云社区 » 正文

excel查询关键字并输出所有结果?

发布时间:2020-04-15 16:51:35

资讯分类:excel  关键字  输出  查询  会在  编写  代码
excel查询关键字并输出所有结果?

我会在Change事件中编写代码如下

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Application.Intersect(Target, Range("E1")) Is Nothing And Target.Count = 1 Then

n=2

with sheet1

for i=2 to .cells(.rows.count,2).end(xlup).row

if .cells(i,2) like "*"& .cells(1,5) & "*" then

.cells(n,5)=.cells(i,2)

n=n+1

end if

next

end with

end if

End Sub

excel查询关键字并输出所有结果?

B2用公式:

=IF(SUM(COUNTIF(A2,"*"&IF(C$2:C$102"

留言与评论(共有 0 条评论)
   
验证码:
Top