【发布时间】:2016-07-21 23:06:41
【问题描述】:
我正在尝试从第 14 行开始循环遍历 K 列直到结束。我编写了以下代码,但它在 Range("K14:") 行停止工作。我尝试使用 Range("K14"& Rows.Count) 但这也无济于事。
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
【问题讨论】:
-
dim lastrow as long lastrow = cells(rows.count,11).end(xlup).row For Each Cell In Range("K14:K" & lastrow ) -
OP 还没有
lastrow... :)