title: Take the average of a filtered column and have the macro display it in a message box
body: <p>This macro runs through an Excel document and filters out 3 rows.  Right now the macro just stops when the third row is filtered, however I would like to take the average of the third row, which has a dynamic range, and have it displayed in a message box.</p>
  
  <pre><code>Sub PriceVerifyMacro()
  
      Dim retval
  
      retval = InputBox("Please Enter The Price Book Header")
  
      If IsNumeric(retval) = False Then
          MsgBox "You didn't enter a number! Try again"
          Exit Sub
      End If
  
      ActiveSheet.Range("$A$1:$CL$293662").AutoFilter Field:=19, Criteria1:="=" &amp; retval
  
      Dim retval1
  
      retval1 = InputBox("Please Enter The Net Weight")
  
      If IsNumeric(retval1) = False Then
          MsgBox "You didn't enter a number! Try again"
          Exit Sub
      End If
  
      ActiveSheet.Range("$A$1:$CL$293662").AutoFilter Field:=40, Criteria1:="=" &amp; retval1
  
      Dim retval2
  
      retval2 = InputBox("Please Enter The PO Cost")
  
      If IsNumeric(retval2) = False Then
          MsgBox "You didn't enter a number! Try again"
          Exit Sub
      End If
  
      ActiveSheet.Range("$A$1:$CL$293662").AutoFilter Field:=70, Criteria1:="=" &amp; retval2
  
  
  
  
      If MsgBox("Would you like to reset the filters?", vbYesNo) = vbNo Then Exit Sub
  
      ActiveSheet.Range("$A$1:$CL$293662").AutoFilter Field:=70
      ActiveSheet.Range("$A$1:$CL$293662").AutoFilter Field:=40
      ActiveSheet.Range("$A$1:$CL$293662").AutoFilter Field:=19
  End Sub
  </code></pre>