DELETE ALL THE ROWS VALUE DATE

nbkqsj7

New Member
Joined
Oct 26, 2020
Messages
20
Office Version
  1. 2010
Platform
  1. Windows
i have a excell sheet Data base which need to be sorted like

1. Add two colums before C
2. Remove these columns H,I J,O to V and X,Y, Z and finaly AB,AC AD and AF
3. the DeleteRows if coume G has valued as "Documentation Validated - Awaiting Funds"
4. finally from column N DeleteRowsAfter Cutoff here the cut off is today +2 (this do not include saturday and sunday) so if today is friday the cut off will be tuesday.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Give this code a try

VBA Code:
Sub del()
Dim lr, i As Long

With ActiveSheet
lr = Cells(Rows.Count, "G").End(xlUp).Row
For i = lr To 2 Step -1
    If Cells(i, "G") = "Documentation Validated - Awaiting Funds" Then
        Cells(i, "G").EntireRow.Delete
    End If
    If WorksheetFunction.NetworkDays(Cells(i, "N"), Now) > 2 Then
        Cells(i, "G").EntireRow.Delete
    End If
Next i
    .Columns("AF").Delete
    .Columns("AB:AD").Delete
    .Columns("X:Z").Delete
    .Columns("V").Delete
    .Columns("O").Delete
    .Columns("H:J").Delete
End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,542
Members
449,169
Latest member
mm424

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top