SUMM with cells range

User avatar
sal21
PlatinumLounger
Posts: 4364
Joined: 26 Apr 2010, 17:36

SUMM with cells range

Post by sal21 »

I need to summ with the WorksheetFunction.Sum statement the range from B2 to BG2 but using cells range, is possible?

Correct this:
MY_TOTAL = WorksheetFunction.Sum(WS.Cells(1, 60))

User avatar
HansV
Administrator
Posts: 78568
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: SUMM with cells range

Post by HansV »

MY_TOTAL = WorksheetFunction.Sum(WS.Range(WS.Cells(2, 2), WS.Cells(2, 59)))

B2 = row 2, column 2
BG2 = row 2, column 59

:whisper: You haven't reacted to the replies in Post=21597 and Post=21116
Best wishes,
Hans

User avatar
sal21
PlatinumLounger
Posts: 4364
Joined: 26 Apr 2010, 17:36

Re: SUMM with cells range

Post by sal21 »

HansV wrote:MY_TOTAL = WorksheetFunction.Sum(WS.Range(WS.Cells(2, 2), WS.Cells(2, 59)))

B2 = row 2, column 2
BG2 = row 2, column 59

:whisper: You haven't reacted to the replies in Post=21597 and Post=21116
Sorry me but i'm very busy
the solution is perfect!