Results 1 to 20 of 84

Thread: VBA - Search For Value Across Multiple Worksheets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    Here is the code, which isn't working.

    Sub Find_PO_Matches3()


    Dim lr
    lr = Worksheets("End Result").Cells(Rows.Count, 1).End(xlUp).Row
    Application.ScreenUpdating = True


    totalsheets = Worksheets.Count
    POs = Worksheets("End Result").Cells(2, 4).Value
    For i = 1 To totalsheets
    If Worksheets(i).Name <> "End Result" Then
    LastRow = Worksheets(i).Cells(Rows.Count, 1).End(xlUp).Row
    For j = 2 To LastRow
    If Worksheets(i).Cells(j, 1).Value = POs Then

    Range("A2").Select
    Range(Selection, Selection.End(xlDown)).Select
    Sheets("Test Data Set").Select
    Range("C73,A3").Select
    Range("A3").Activate
    Range(Selection, Selection.End(xlDown)).Select
    ActiveWindow.SmallScroll Down:=-310
    Windows("67340-2020-2021 Workbook V. 2.xlsm").Activate
    Windows("67342-Test Macro - Delete Used POs.xlsm").Activate

    End If

    Next
    End If
    Next


    End Sub
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •