Here is the code:
Sub SearchReceiving()
Worksheets("Sheet2").Activate
Dim rngFnd2 As Range
Set rngFnd2 = Worksheets("Sheet2").Cells.Find(What:=Sheet1.Cells(2, 2).Text, After:=Sheet2.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False)
If rngFnd2 Is Nothing Then
Worksheets("Sheet1").Activate
Sheet1.Cells(5, 2).Activate
ActiveCell.Value = 0
Application.Wait (Now + TimeValue("0:00:01"))
Exit Sub
Else
rngFnd2.Offset(0, -7).Activate
Cells.Find(What:="Total", After:=ActiveCell, LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 15).Range("A1").Select
Selection.Copy
Worksheets("Sheet1").Activate
Sheet1.Cells(5, 2).Activate
ActiveCell.PasteSpecial (xlPasteValues)
End If
End Sub
The code works great and searches the entire sheet and returns the Total value. Instead now i want it to search all sheets after Sheet 2, then copy each value it finds to Sheet1 so that way it can be totaled up from there.
So basically the modifications to the above list are: search all sheets after Sheet2 for rngfnd2, copy all values it finds into sheet 1, starting in Row 1 of Column Y and continuing down.
Bookmarks