Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sum command in VBA

I have a xcel spreadsheet that reads data from an Access
database. Since the database determines how many rows
are in the database - I need to programatically create
the totals at the bottom of a column....

something like:
ws.[c19].Offset(iro, i) = SUM(ws.[c19].Offset(0, i):ws.
[c19].Offset(irow,i))

but of course that gives an error .... I know this can't
be that difficult!

Thanks,
Sally
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Sum command in VBA

ws.[c19].Offset(iro, i).Formula = "=SUM(" & _
ws.Range(ws.[c19].Offset(0, i),ws.[c19].Offset(irow,i).Address
& ")"

--
Regards,
Tom Ogilvy

sally wrote in message
...
I have a xcel spreadsheet that reads data from an Access
database. Since the database determines how many rows
are in the database - I need to programatically create
the totals at the bottom of a column....

something like:
ws.[c19].Offset(iro, i) = SUM(ws.[c19].Offset(0, i):ws.
[c19].Offset(irow,i))

but of course that gives an error .... I know this can't
be that difficult!

Thanks,
Sally



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
One command in one cell initiating another command in another cel. Chas52 Excel Worksheet Functions 3 November 7th 09 06:57 PM
command code ( GOTO command) in formula calan New Users to Excel 1 June 11th 09 09:44 AM
command button add another command Wanna Learn Excel Discussion (Misc queries) 5 December 7th 08 11:42 PM
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
Excel has a "Find Next" command but no "Find Previous" command. Michael Fitzpatrick Excel Discussion (Misc queries) 2 January 10th 05 11:45 PM


All times are GMT +1. The time now is 02:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"