Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi There, I am trying to write a macro that get the total (Sum of Column B) of a column if row is infinite (meaning number of rows varied up to 5000 rows). Please see example data below. A B Invoice Summary Report Account Total Amount Due 9 $24.94 22 $346.40 27 $153.34 42 $202.58 48 $31.24 53 $120.97 3671060 $3,484.06 Any help is very much appreciated. Thanks Andrew -- Akaplen ------------------------------------------------------------------------ Akaplen's Profile: http://www.excelforum.com/member.php...o&userid=24926 View this thread: http://www.excelforum.com/showthread...hreadid=384645 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Can you just use the following? sum(B:B) -- jmagdziarz ------------------------------------------------------------------------ jmagdziarz's Profile: http://www.excelforum.com/member.php...o&userid=23108 View this thread: http://www.excelforum.com/showthread...hreadid=384645 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Assuming data starts in B2: Sub InvTot() Dim tot As Double Set rng = Range("b2:b" & Cells(Rows.Count, "b").End(xlUp).Row) tot = Application.Sum(rng) End Sub HTH "Akaplen" wrote: Hi There, I am trying to write a macro that get the total (Sum of Column B) of a column if row is infinite (meaning number of rows varied up to 5000 rows). Please see example data below. A B Invoice Summary Report Account Total Amount Due 9 $24.94 22 $346.40 27 $153.34 42 $202.58 48 $31.24 53 $120.97 3671060 $3,484.06 Any help is very much appreciated. Thanks Andrew -- Akaplen ------------------------------------------------------------------------ Akaplen's Profile: http://www.excelforum.com/member.php...o&userid=24926 View this thread: http://www.excelforum.com/showthread...hreadid=384645 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
summation | Excel Worksheet Functions | |||
Summation from a to b | Excel Worksheet Functions | |||
Summation | Excel Programming | |||
VBA code to perform summation and product summation | Excel Programming | |||
Summation | Excel Programming |