简体   繁体   English

这行在Excel VBA中是什么意思?

[英]What does this line mean in Excel VBA?

I dont really get this line of code. 我真的没有得到这行代码。

With Worksheets("SKU2PCA")
  .Range(Cells(SKU2PCA_New_RowNum + 1, SKU2PCA_StartBkt_ColNum), Cells(SKU2PCA_New_RowNum + PCACount, SKU2PCA_Last_ColNum)).FormulaR1C1 = _
            "=VLOOKUP(RC1&RC2,BOM!C4:C5,2,FALSE)*SKU2PCA_Staging!R" & SKU2PCA_Last_RowNum + 1 & ""
        Selection.NumberFormat = "General"

    End With

I am understanding that it means like 我了解这意味着

RC1&RC2 : This row 1st column and This row 2nd Column RC1&RC2:此行第一列和此行第二列
Find for the Rc1& Rc2 in the BOM worksheet in the ranges of C4 to C5 and obtain the 2nd column value with exact matching. 在BOM表工作表中C4至C5的范围内找到Rc1和Rc2,并获得完全匹配的第二列值。

But the *SKU2PCA_Staging onwards is what i dont get it 但是* SKU2PCA_Staging开始是我没有得到的

SKU2PCA_Staging is a another worksheet with table and SKU2PCA_Last_RowNum is an Int value. SKU2PCA_Staging是带有表的另一个工作表,SKU2PCA_Last_RowNum是一个Int值。

Thanks! 谢谢!

"=VLOOKUP(RC1&RC2,BOM!C4:C5,2,FALSE)*SKU2PCA_Staging!R" & SKU2PCA_Last_RowNum + 1 & ""

The above is a multiplication of two values. 上面是两个值的乘积。 The first is VLOOKUP(RC1&RC2,BOM!C4:C5,2,FALSE) , the second SKU2PCA_Staging!R" & SKU2PCA_Last_RowNum + 1 第一个是VLOOKUP(RC1&RC2,BOM!C4:C5,2,FALSE) ,第二个是SKU2PCA_Staging!R" & SKU2PCA_Last_RowNum + 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM