Forum Discussion

chancelin's avatar
chancelin
Copper Contributor
Nov 28, 2018

Referencing Ranges in Other Sheets

Hello  family,

 

Referencing Ranges in Other Sheets, it's easier to use With ... End With, for exemple,

With Worksheets(“Sheet2”)

    WorksheetFunction.Sum(.Range(.Range(“A1”), .Range(“A7”)))

End With

 

but a friend told me that we could also use the following code

WorksheetFunction.Sum(Worksheets(“Sheet2”).Range(Worksheets(“Sheet2”). _ Range(“A1”), Worksheets(“Sheet2”).Range(“A7”)))

 

what do you think?

 

 

No RepliesBe the first to reply

Resources