[AccessD] (OT) Excel - adding cell values

Oleg_123 at xuppa.com Oleg_123 at xuppa.com
Wed May 28 11:12:50 CDT 2003


Bryan, thanks it works :))

> 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
>
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com



-----------------------------------------
You are entitled to Get 100% FREE perfume (S&H is FREE)!
Click Here: http://azjmp.com/az/ch.php?f=176&i=657&sub=webmail




More information about the AccessD mailing list