7,787
社区成员
发帖
与我相关
我的任务
分享
sub clarifysb()
Dim l As Integer
Dim helpsb as String
ReDim sb(l) as string
Sheets(project).select
selection.autofilter field:=14, criterial="=SB*", Operator: =xlAnd
activesheet.range("N1").select
selction.end(xldonw).select
l=0
do until activecell.value="Remark"
helpsb= activecell.value
select case helpsb
case is="SB*"
if activecell.offset(0,-9).value="x" then
for l=0 to ubound(sb)
if sb(l)=helpsb then
activecell.offset(-1,9).select
go to here2 '也问一下,这里有什么方法可以直接结束select语句进行下一个循环
end if
next l
redim preserve sb(l)
sb(l)=helpsb
activecell.offset(-1,0).select
if activecell.offset(0,-9).value<>"x" then
activecell.offset(-1,-9).select
end if
case else '这里显示“case else不能在select case 之外”
activecell.offset(-1,0).select
end select
here2:
Loop
end sub
do until activecell.value="Remark"
helpsb= activecell.value
select case helpsb
case is="SB*"
if activecell.offset(0,-9).value="x" then
for l=0 to ubound(sb)
if sb(l)=helpsb then
activecell.offset(-1,9).select
go to here2 '也问一下,这里有什么方法可以直接结束select语句进行下一个循环
end if
next l
redim preserve sb(l)
sb(l)=helpsb
activecell.offset(-1,0).select
if activecell.offset(0,-9).value<>"x" then
activecell.offset(-1,-9).select
end if
endif
case else '这里显示“case else不能在select case 之外”
activecell.offset(-1,0).select
end select
here2:
Loop
end sub