我正在嘗試循環遍歷從第14行開始的第K列直到結束。我寫了下面的代碼,但它在Range(「K14:」)行停止工作。我嘗試使用Range(「K14」& Rows.Count),但這也沒有幫助。在VBA中循環遍歷一行以複製整行
Windows("Price VolatilityDM.xlsm").Activate
Sheets("Volatility Static Data").Activate
Dim x As Single
Dim Cell As Range
For Each Cell In Range("K14:")
If Cell.Value > 0.25 Then
Sheets("Volatility Static Data").Range("B:K").Copy
Windows("Tolerance ReportDM.xslm").Activate
Sheets("Sheet1").Range("K17:Q17").Paste
End If
Next Cell
'暗淡LASTROW只要 LASTROW =細胞(rows.count,11).END(xlup).row 爲每個小區在範圍(「K 14:K「&lastrow)' – Diogo
OP沒有'lastrow' ...但:) – Dave