I want to delete row that column Type not = II and column Status not = Pass , Wait.
Please guide me about it.
remark My file have data rows = 300K
I want solution by VBA
I want to delete row that column Type not = II and column Status not = Pass , Wait.
Please guide me about it.
remark My file have data rows = 300K
I want solution by VBA
Follow output in the image:
PHP Code:
Option Explicit
Sub pass()
Dim Lr&, k&, cell As Range, arr()
Lr = Cells(Rows.Count, "B").End(xlUp).Row
ReDim arr(1 To Lr, 1 To 3)
For Each cell In Range("B2:B" & Lr)
If cell.Value = "II" And (cell.Offset(0, 1).Value = "Pass" Or cell.Offset(0, 1).Value = "Wait") Then
k = k + 1
arr(k, 1) = cell.Offset(0, -1).Value
arr(k, 2) = cell.Value
arr(k, 3) = cell.Offset(0, 1).Value
End If
Next
Range("E1:G1").Value = Range("A1:C1").Value
Range("E2").Resize(k, 3) = arr
End Sub
Quang PT
Please Login or Register to view this content.
Last edited by sintek; 03-22-2022 at 02:26 AM.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks