Reference worksheet and range by name : SUM « Excel « VBA / Excel / Access / Word






Reference worksheet and range by name

 
Sub ReferAcrossWorksheets1()
  MsgBox WorksheetFunction.Sum(Sheets("Sheet1").Range( _
      Sheets("Sheet1").Range("A1"), Sheets("Sheet1").Range("A10")))
End Sub

 








Related examples in the same category

1.Enters a value in 10 cells in a column and then sums the values
2.Use with statement with worksheet