excel VBA run macro automatically when a cell is changed
<p>I found a lot of answers to my question following this link: <a href="https://stackoverflow.com/questions/409434/automatically-execute-an-excel-macro-on-a-cell-change">automatically execute an Excel macro on a cell change</a></p>

<p>The reason I'm opening a new question is because I don't have enough reputation to comment on that thread and I'm having difficulty connecting my linked cell to the macro I want to run.</p>

<p>So the cells that are linked contains a formula causing it to change value only when I change other cells. The problem I'm having is that my macro only runs if I change the value of the cell and not the value of the formula. I'm looking for a way to activate the macro when the value that the formula returns changes.</p>

<p>This is my code so far:  </p>

<p>My range of cells is named "Values" and I want to hide the label "Refresh"</p>

<pre><code>Private Sub Worksheet_Change(ByVal Target As Range)

    If Intersect(Target, Me.Range("Values")) Is Nothing Then Exit Sub
        Application.EnableEvents = False 'to prevent endless loop

        Sheet1.Refresh.Visible = False

        Application.EnableEvents = True
End Sub
</code></pre>

<p>Sorry again for opening another question but as I said I couldn't comment on the other thread.</p>