I feel like I'm missing something basic, but I have the following bit of code that is referring to a table on another sheet.
Sub availabilityTab()
Dim cell As String
Dim i As Integer
With Sheets("Availability")
.Cells.Clear
.Range("A3") = "=BackgroundData[#Headers]"
For i = 1 To 5
cell = .Cells(3, i)
.Cells(4, i) = "=BackgroundData[" & cell & "]"
Next i
End With
End Sub
Unfortunately, when it inserts the formula in these cells it inserts an "@" that keeps the result from spilling, such as
=@BackgroundData[#Headers]
in A3. Or
=BackgroundData[@ID]
in A4. How do I keep it from inserting the @? Thanks!