Sum command in VBA

  • Thread starter Thread starter sally
  • Start date Start date
S

sally

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
 
ws.[c19].Offset(iro, i).Formula = "=SUM(" & _
ws.Range(ws.[c19].Offset(0, i),ws.[c19].Offset(irow,i).Address
& ")"
 
Back
Top