title: Link to unique row and filter accordingly with VBA
body: <p>I am trying to create a macro enabled button or hyperlink that once clicked will link to a value in the same row, copy its value and go to another sheet and apply a filter based on that value. </p>
  
  <p>edit: Here is the Hyperlink formula I used. </p>
  
  <pre><code>=HYPERLINK("#Sheet2!d6","Press button to filter")
  </code></pre>
  
  <p>Sub Macro2()
  '</p>
  
  <pre><code>' Macro2 Macro
  '
  
  '
      ActiveCell.Select
      Application.Goto Reference:="R6C4"
      Selection.Copy
      Sheets("Database").Select
      ActiveCell.Offset(-33, 3).Range("A1").Select
      ActiveSheet.Range("$A$3:$R$206909").AutoFilter Field:=8, Criteria1:= _
          "copy this value"
  End Sub
  </code></pre>
  
  <p>This is the Macro I tried using but can't get the hyperlink to use the macro and it doesn't work when I try to use it on a different row.</p>
  
  <p>macro enabled button<br>
  <a href="https://i.stack.imgur.com/HqTIa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HqTIa.png" alt="macro enabled button"></a></p>
  
  <p>takes the value and puts in a filter<br>
  <a href="https://i.stack.imgur.com/YiMfL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YiMfL.png" alt="takes the value and puts in a filter"></a></p>