Do… Loop Until with multiple conditions

前端 未结 3 371
醉酒成梦
醉酒成梦 2021-01-20 16:30

I have a quick question about which I did not find specific information on the web. I want to perform a Do...Loop Until loop, but I would like to insert more th

3条回答
  •  鱼传尺愫
    2021-01-20 17:27

    It is possible indeed as if you were using "if " statement, for example:

    Do Until rngCell.Value="" Or rngCell.Value="abc"
       DatePresent = (rngCell.Value = "RESP") Or (rngCell.Value ="Respiratory")
       Set rngCell = rngCell.Offset(1)
    Loop
    

提交回复
热议问题