You are correct. As already noted in another answer to this question, you can limit the application of your formula using If not [Range] Is Nothing
, but here is an alternative approach that produces a list of all visible cell ranges within a specific column, and then simply loops through those ranges to apply the formula:
Sub loFormulaLoop()
Application.ScreenUpdating = False 'added to make the code run faster
'Explicitly defining everything saves time in the event of changes
Dim wb As Workbook: Set wb = ThisWorkbook
Dim ws As Worksheet
Dim lo As ListObject
Dim colorColumn As Integer
Dim formulaColumn As Integer
Dim cellList As String
Dim arrayList As Variant
Dim iteration As Integer
Set ws = wb.Sheets("RedaData")
Set lo = ws.ListObjects("Study_Setup")
colorColumn = 31
formulaColumn = 30
'Apply Filter
lo.Range.AutoFilter Field:=colorColumn, Criteria1 _
:=RGB(255, 255, 204), Operator:=xlFilterCellColor
'Get every range in the formula column that is visible and apply the formula
cellList = CStr(lo.ListColumns(formulaColumn).Range.SpecialCells(xlCellTypeVisible).Address)
arrayList = Split(cellList, ",")
For iteration = 1 To UBound(arrayList)
ws.Range(arrayList(iteration)).Select
Selection.Formula = "=IFERROR(INDEX(C[-29]:C[-9],MATCH(1,(C[-26]=RC[-29])*(C[-29]=RC[-26]),0),5),"""")"
Next iteration
Application.ScreenUpdating = True 'Display results
End Sub