[Solved] Search all active sheets for string with offset [closed]


Here I assume the value to be found is in cell A1 and the retrieved data will be placed in cell B1

Sub RetrieveStuff()
    Dim v As Variant, rDest As Range, Nm As String
    Dim sh As Worksheet

    With ActiveSheet
        v = .Range("A1").Value
        Set rDest = .Range("B1")
        Nm = .Name
    End With

    For Each sh In Sheets
        If sh.Name <> Nm Then
            Set rfound = sh.Cells.Find(what:=v, After:=sh.Cells(1, 1))
            If Not rfound Is Nothing Then
                rfound.Offset(0, 6).Copy rDest
                Exit Sub
            End If
        End If
    Next sh

End Sub

You may want to alert the user if the data cannot be found.

solved Search all active sheets for string with offset [closed]