Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Range Total in VBA
Excel2k
Hi I've set a range in vba (ActiveCell.Range("A1:E1")) and I'd like to find out the value of this range (The equivilant of =Sum("A1":"E1") CAn anyone help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Range Total in VBA
Hi
try dim rng set rng = range("A1:E1") msgbox applicatuion.worksheetfunction.sum(rng) -- Regards Frank Kabel Frankfurt, Germany JimPNicholls wrote: Excel2k Hi I've set a range in vba (ActiveCell.Range("A1:E1")) and I'd like to find out the value of this range (The equivilant of =Sum("A1":"E1") CAn anyone help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Range Total in VBA
One way:
Dim dSum As Double dSum = Application.Sum(ActiveCell.Resize(1, 5)) In article , "JimPNicholls" wrote: Excel2k Hi I've set a range in vba (ActiveCell.Range("A1:E1")) and I'd like to find out the value of this range (The equivilant of =Sum("A1":"E1") CAn anyone help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Returning Range Total in VBA
Hi,
Sub TEST_1() MsgBox Application.Sum([A1:E1]) End Sub Sub TEST_2() MsgBox [SUM(A1:E1)] End Sub -- Regards, Soo Cheon Jheong _ _ ^ąŻ^ -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel returning an incorrect total | Excel Discussion (Misc queries) | |||
Function returning the total of two adjacent columns | Excel Worksheet Functions | |||
Returning a range using IF | Excel Worksheet Functions | |||
Summing related cell values and returning total to summary | Excel Discussion (Misc queries) | |||
MY VLOOKUP IS RETURNING N/A AND THEREFORE MY TOTAL SUM AT THE BOT. | Excel Discussion (Misc queries) |