Excel精英培训网

 找回密码
 注册

确定位置

已有 490 次阅读2016-5-17 14:28

Sub 确定位置()
    Dim i, s
    For i = 1 To 30
        If Cells(i, 1) = 17 Then
            s = s + 1
            If s = 3 Then    '指定第几次
                MsgBox "第" & s & "次在" & i & "行"
                Exit For
            End If
        End If
    Next
End Sub

评论 (0 个评论)

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-6-29 08:02 , Processed in 0.098869 second(s), 8 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

返回顶部