Referencing Ranges in Other Sheets

Copper Contributor

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?

 

 

0 Replies