1
I have the table below in the photo, and would like to create a stacked area chart based on benchmarks (column values). I’m using the following code
Private Sub CommandButton1_Click()
Dim planilhaB As Worksheet
Dim rng As range
Set planilhaB = ThisWorkbook.Worksheets("Planilha2")
planilhaB.range("A1").Select
planilhaB.range(Selection, Selection.End(xlToRight)).Select
planilhaB.range(Selection, Selection.End(xlDown)).Select
Set rng = Selection
End Sub
But she also selects the column Total of the Day. I don’t want to reference cells pq may be that new columns are added in the future, before the Total of the Day column.