Trying to make my "time spent versus time allocated chart" update when new values are inputted in the chart below it.
Cells K35:N60 are populated with formulas that will only show a value if they are inputted on another sheet.
K35: =IF(ROW()-ROW(K$34)<=SUM(IFERROR(--(('Project - Gantt Chart'!$B$9:$B$45/INT('Project - Gantt Chart'!$B$9:$B$45))=1),"")),ROW()-ROW(K$34),"")
L35: =IFERROR(INDEX('Project - Gantt Chart'!$B$9:$I$45,MATCH('Executive Summary'!$K35,'Project - Gantt Chart'!$B$9:$B$45,0),4),"")
M35: =IFERROR(INDEX('Project - Gantt Chart'!$B$9:$I$45,MATCH('Executive Summary'!$K35,'Project - Gantt Chart'!$B$9:$B$45,0),5),"")
N35: =IFERROR(INDEX('Project - Gantt Chart'!$B$9:$I$45,MATCH('Executive Summary'!$K35,'Project - Gantt Chart'!$B$9:$B$45,0),8),"")
Below is the code I have been trying to use. I don't really have any other insights on how to go about this so any suggestion would be more than welcomed! Thank you.
Cells K35:N60 are populated with formulas that will only show a value if they are inputted on another sheet.
K35: =IF(ROW()-ROW(K$34)<=SUM(IFERROR(--(('Project - Gantt Chart'!$B$9:$B$45/INT('Project - Gantt Chart'!$B$9:$B$45))=1),"")),ROW()-ROW(K$34),"")
L35: =IFERROR(INDEX('Project - Gantt Chart'!$B$9:$I$45,MATCH('Executive Summary'!$K35,'Project - Gantt Chart'!$B$9:$B$45,0),4),"")
M35: =IFERROR(INDEX('Project - Gantt Chart'!$B$9:$I$45,MATCH('Executive Summary'!$K35,'Project - Gantt Chart'!$B$9:$B$45,0),5),"")
N35: =IFERROR(INDEX('Project - Gantt Chart'!$B$9:$I$45,MATCH('Executive Summary'!$K35,'Project - Gantt Chart'!$B$9:$B$45,0),8),"")
Below is the code I have been trying to use. I don't really have any other insights on how to go about this so any suggestion would be more than welcomed! Thank you.
VBA Code:
Private Sub TimeSpent()
Dim ch As ChartObject
Set ch = Worksheets("Executive Summary").ChartObjects("Chart 8")
LastRow = Worksheets("Executive Summary").Columns("J").Find(1, SearchDirection:=xlPrevious, LookIn:=xlValues, LookAt:=xlWhole).Row
Worksheets("Executive Summary").ChartObjects("Chart 8").Activate
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(1).Name = Worksheets("Executive Summary").Range("L34")
ActiveChart.FullSeriesCollection(1).Values = Range(Cells(35, 12), Cells(LastRow, 12))
ActiveChart.SeriesCollection.NewSeries
ActiveChart.FullSeriesCollection(2).Name = Worksheets("Executive Summary").Range("M34")
ActiveChart.FullSeriesCollection(2).Values = Range(Cells(35, 13), Cells(LastRow, 13))
ActiveChart.HasLegend = True
End Sub