用于循环处理继续

问题描述 投票:1回答:1

[我知道VBAcontinue没有for loop,所以我的任务变得棘手,因为一旦匹配就不再想遍历所有字段

我有Sheet1

enter image description here

事物已经由Category,Priority排序。字母字段是唯一的。

我有Sheet2

enter image description here

字母字段是唯一的。绿色是宏应该做什么。我需要根据优先级将类别分配给Sheet2。例如:

  1. [Sheet1.A-> Sheet2中没有A,continue
  2. [Sheet1.B->找到Sheet2.B-分配Category
  3. [Sheet1.C->由于已经为qqq类别分配了continue

如果Continue可用,我本可以为for loops做两个if statements(嵌套)和一些continue,但是由于它不可用,所以我有点坚持。有什么建议吗?

excel vba excel-vba
1个回答
0
投票

您可以使用每个人最不喜欢的控件“结构”来伪造它:

© www.soinside.com 2019 - 2024. All rights reserved.