Guest User

Untitled

a guest
Sep 18th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Referencing previous sheet in macro for excel chart
  2. ActiveChart.SeriesCollection(1).Name = "='ActiveChart.Next.Select'!$B$1"
  3.  
  4. ActiveChart.SeriesCollection(1).Name = "=Sheets(1)!$B$1"
  5.  
  6. =Sheet1!A1
  7.  
  8. Dim ws As Worksheet
  9. Dim formula As String
  10.  
  11. Set ws = ActiveSheet.Next
  12. formula = "=" & ws.name & "!A1"
  13.  
  14. ActiveChart.SeriesCollection(1).name = formula
Add Comment
Please, Sign In to add comment