So here is the code that I am working with:
c = Application.Match("Test", Range("F1:F130"), 0)
ActiveChart.SeriesCollection(1).XValues = "='" & shtname & "'" & "!$B$104:$N$104"
So similar to the plot I would want to be able to say because c+4 = some integer which is not always 104.
ActiveChart.SeriesCollection(1).XValues = "='" & shtname & "'" & "!$B$(c+3):$N$(c+3)"
I have tried using doing something like:
ActiveChart.SeriesCollection(1).XValues = "='" & shtname & "'" & "!$B$" & " (c+3):$N$" & " (c+3) "
This did not work... obviously, but I am very new to VBA and the syntax, so any help is appreciated. Here is the function for shtname as well:
Function shtname() As String
shtname = ActiveSheet.Name
End Function