Howdy Monday Excel Experts,
I have an idea of how I need to organize the code, but there are facets of knowledge here that I'm not acquainted with and was hoping someone could help me out...
Trying to identify a value in a particular range, once that value is found, i need to CUT the entire row and paste it into a newly create sheet.
When I've found everything I need pull.. I need to go back through and delete all the blank rows I've just created through cut&paste.
I have an idea of how I need to organize the code, but there are facets of knowledge here that I'm not acquainted with and was hoping someone could help me out...
Trying to identify a value in a particular range, once that value is found, i need to CUT the entire row and paste it into a newly create sheet.
When I've found everything I need pull.. I need to go back through and delete all the blank rows I've just created through cut&paste.
Code:
Sub thirdparty()
Dim myWorksheet As Worksheet
Dim myLastRow As Long
Dim row As Long
Dim mycell As Range
ActiveWorkbook.Sheets("HazShipper").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set myWorksheet = Worksheets("HazShipper")
myLastRow = myWorksheet.Cells(myWorksheet.Rows.Count, "A").End(xlUp).row
row = 2
For Each mycell In Range("U2", Range("U" & myLastRow))
[COLOR=#ff0000]create new sheet here....???[/COLOR]
[COLOR=#ff0000]If mycell.Value = UPS, FEDEX, DHL, EXPO, CHARTER, or STERLING[/COLOR]
[COLOR=#ff0000]
[/COLOR]
[COLOR=#ff0000]then[/COLOR]
[COLOR=#ff0000]
[/COLOR]
[COLOR=#ff0000]CUT the entire ROW ("A:BA") and paste it into a newly created sheet called "3rd Party"(same workbook)[/COLOR]
row = row + 1
Loop
[COLOR=#ff0000]onces this loops through to the last row... I need to delete all the empty rows I just created through CUTTING and pasting.[/COLOR]
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub