lhj323323 发表于 2011-5-17 14:23
回复 Zipall 的帖子
一定要用,因为这只是整个程序中的一小部分,
vba中也可以使用工作表函数
Private Sub CommandButton1_Click()
With Sheets("报价")
For r = 2 To .[d65536].End(xlUp).Row
If .Cells(r, 4) < Sheets("利率").[b2] Then
.Cells(r, 8) = "无记录"
Else
.Cells(r, 8) = Application.WorksheetFunction.VLookup(.Cells(r, 4), Sheets("利率").[b2:c7], 2, 1)
End If
Next
End With
End Sub