我试图在我的电子表格中运行方程式,该方程式将通过“I”列并删除从现在起90天内没有到期日期的每一行...在换句话说,我试图将我的电子表格格式化为只给我一份即将在未来90天内过期的所有内容。我放星星的地方就是我无法插入方程的地方。我不知道如何插入公式,但如果它是在单元格中运行,它看起来像这样= IF(AND(I11-900),1,0)= 1。我会怎么改变Q11是如此这样,当公式运行将适用于每一个细胞在I列,而不只是我11在列中的每个单元格中运行公式
Sub DeleteNow()
Dim Firstrow As Long
Dim Lastrow As Long
Dim Lrow As Long
Dim CalcMode As Long
Dim ViewMode As Long
With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With
With Sheets("Copy")
.Select
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView
.DisplayPageBreaks = False
Firstrow = .UsedRange.Cells(1).Row
Lastrow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
For Lrow = Lastrow To Firstrow Step -1
With .Cells(Lrow, "I")
If Not IsError(.Value) Then
If ******************** Then .EntireRow.Delete
End If
End With
Next Lrow
End With
ActiveWindow.View = ViewMode
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With
End Sub
什么在'Q11'? – shahkalpesh