(Solved) – How do I get Excel to refresh any cell in error state

  • by
(solved)-–-how-do-i-get-excel-to-refresh-any-cell-in-error-state

Sorry I’m new to macros.

Essentially what I need done is if a cells value is “ERROR” then refresh the cell to check for new data. I have the msgbox there to make sure I have everything up to that working. I’m not attached to this code if theres a better method.

Sub Cell_Looping1()

'c = cell

For Each c In Selection

'Do this
If c.Value = "ERROR" Then
MsgBox "Cell " & c.Address & " needs to be refreshed"



End If

Next c
    End Sub

To add some context. “ERROR” happens when I pull too much data from the API. I generally resolve this by selecting the cell in error pressing F2 then Enter. This macro will make life so much easier.

Leave a Reply

Your email address will not be published. Required fields are marked *