Hey everyone. I am currently trying to sort through several rows and columns of data to find specific values which meet the criteria I have inserted into my present code. I have several columns of data which contain for individual graphs. As of now the code is able to loop through the Column A and find the numbers which meet the criteria, and then insert them into either a new column or a new sheet. What I would like for the code to do is sort through each column, find all the numbers that meet the criteria, and then place all of those numbers into one column in a new spreadsheet. The code I have written is basically a peak-finding program that is as follows:

Sub FindMaxForce()

b = 1

For Row = 1 To 10000

Set CellBefore = Worksheets("Sheet1").Range("A1").Offset(Row - 1, 0)
Set CellMid = Worksheets("Sheet1").Range("A1").Offset(Row, 0)
Set CellAfter = Worksheets("Sheet1").Range("A1").Offset(Row + 1, 0)

If CellMid = "" Then Exit Sub
If CellMid >= CellBefore And CellMid >= CellAfter And CellMid >= 30 Then
Cells(b, 3) = CellMid
b = b + 1
CellBefore.Activate

End If

Next Row

End Sub


I am grateful for any suggestions anyone out there might have for me. Thanks!