I want to cut rows which have emails in them. How can I do this? i just want to take out those websites which have emails and I want to create separate file for those websites which dont have emails. How to do this?
I want to cut rows which have emails in them. How can I do this? i just want to take out those websites which have emails and I want to create separate file for those websites which dont have emails. How to do this?
try this:
Sub test() ' Find last row with fleet number LR = Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Row ' Loops from last to first row For X = LR To 2 Step -1 ' if value in column B is >0 or the cell is empty, it deletes the row If Sheets("Sheet1").Range("B" & X) <> "" Or 0 Then Rows(X).Delete Shift:=xlUp Next End Sub
Or to have them in seperate sheet, in exemple sheet2
Kind regardsSub test() lr = Range("A" & Rows.Count).End(xlUp).Row Range("A1", "D" & lr).AutoFilter Field:=2, Criteria1:="=" With Range("A1").CurrentRegion .Offset(1).Copy Sheets("sheet2").Range("A2") .Offset(1).Delete shift:=xlUp End With Range("A1", "D" & lr).AutoFilter End Sub
Leo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks