Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9064839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:21:21+00:00 2026-06-16T16:21:21+00:00

I am trying to run an equation in my spread sheet that will go

  • 0

I am trying to run an equation in my spread sheet that will go through column “I” and delete every row that does not have an expiration date within 90 days from now… In other words i am trying to format my spread sheet to just give me a list of everything that is expiring in the next 90 days. The row where I put the stars is where I am having difficulty inserting the equation. I am not sure how to insert the equation but if it was ran in cell by itself it would look like this =IF(AND(I11-900),1,0)=1. What would I change Q11 to be so that way when the equation is run it will apply to every cell in the I column instead of just 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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:21:25+00:00Added an answer on June 16, 2026 at 4:21 pm
    Sub deleteRowsWithDateNotIn90Days()
    Dim lastRow As Integer
    Dim firstRow As Integer
    Dim ctr As Integer
    
    Dim currentCell As Range
    Dim valueOfIColumn
    Dim isWithin90Days As Boolean
    
    lastRow = 17
    firstRow = 1
    
    Application.ScreenUpdating = False
    With Sheets("Copy")
        For ctr = lastRow To firstRow Step -1
            Set currentCell = .Cells(ctr, 9)
            valueOfIColumn = currentCell.Value
            isWithin90Days = valueOfIColumn >= Date And valueOfIColumn <= (Date + 90)
    
            If Not isWithin90Days Then
                Debug.Print "deleting row of cell " + currentCell.Address
                currentCell.EntireRow.Delete
            End If
        Next
    End With
    Application.ScreenUpdating = True
    End Sub
    

    EDIT: Use this as a basis to get started.
    You can remove unnecessary code generated by the macro recorder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to run my program in FreeBSD OS, I have the following results: $
Hey, so basically I have this issue, where I'm trying to put an equation
When I trying run Android Emulation, i Have error message: $ tools/emulator -avd Default
I am trying run geotools on the web and have been googling around how
What im trying to do is have the program to run the first set
trying to run this program. I think that to setup all of the web
I'm trying run this procedure with generic parameters. If I can't delete because some
Trying to run my program through java web start. I get the following exception
I am trying to create a simple online calculator that can run basic calculations
I am trying run a program from a qmake .pro file which modifies the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.