Bryan Carbonnell
Bryan_Carbonnell at cbc.ca
Tue May 27 13:36:41 CDT 2003
Sorry for coming to the party late, but give this a shot: dim rng as range dim dblAnswer as Double set rng = Worksheets("Sheet1").Range("C13:C18") dblAnswer = WorksheetFunction.Sum(rng) Debug.print dblAnswer WorksheetFunction will allow you to use some Excel Worksheet functions in your VBA code. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> Oleg_123 at xuppa.com 27-May-03 12:30:44 PM >>> It was a first thing i tried. Gives me an error message "sub or function not defined" > You can try C = SUM("C13:C18") > > Doris Manning > -----Original Message----- > From: accessd-bounces at databaseadvisors.com > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of > Oleg_123 at xuppa.com > He group, > does anyone know if I can use SUM in the case below ? I can't seem to > find it. Thanks > > C = Range("C13").Value + Range("C14").Value + Range("C15").Value + > Range("C16").Value + Range("C17").Value + Range("C18").Value