delete rows based on dates

  • Hi first time user of ozgrid so thankyou need some excel help



    would like vba code to delete dates in column G .the date column has this text 13/03/2018 6:00:00 AM in it. the file has a heading in row 1
    So the file will always have 300 to 500 rows in it and I would like to have the code delete the rows with all dates 2 days before todays date,and delete the rows with all dates 2 days after todays date.i have copied lots of different code from the net and none of them would work as I wanted after editing .


    Thankyou again example below


    regards simon


    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 575"]

    [tr]


    [td]

    Order ID

    [/td]


    [td]

    Order Line Qty

    [/td]


    [td]

    Order Line SKU

    [/td]


    [td]

    Purchase Order ID

    [/td]


    [td]

    Bill Company

    [/td]


    [td]

    Order Status

    [/td]


    [td]

    Date Required

    [/td]


    [td]

    Pick Slip Abbrev.

    [/td]


    [/tr]


    [tr]


    [td]

    SO-35144

    [/td]


    [TD="align: right"]1[/TD]

    [td]

    3PTi-SoAnl-3ph

    [/td]


    [td]

    38836 - 102728

    [/td]


    [td]

    Operations Co Pty Ltd (NEW)

    [/td]


    [td]

    On Hold

    [/td]


    [TD="align: right"]13/03/2018[/TD]

    [td][/td]


    [/tr]


    [tr]


    [td]

    SO-35144

    [/td]


    [TD="align: right"]1[/TD]

    [td]

    3pTi-AlLab

    [/td]


    [td]

    38836 - 102728

    [/td]


    [td]

    erations Co Pty Ltd (NEW)

    [/td]


    [td]

    On Hold

    [/td]


    [TD="align: right"]13/03/2018[/TD]

    [td]



    [/td]


    [/tr]


    [/TABLE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!