+ Reply to Thread
Results 1 to 3 of 3

Code to sum cell values using a loop method

  1. #1
    Registered User
    Join Date
    04-14-2012
    Location
    saudi arabia
    MS-Off Ver
    Excel 2007
    Posts
    15

    Code to sum cell values using a loop method

    Hi,

    I want to write a code but I get a lot of errors as I am not really familiar with syntax

    I wonder if someone can convert the following:

    Please Login or Register  to view this content.
    Last edited by qussai; 07-10-2012 at 08:55 AM. Reason: This post needed code tags.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Code to sum cell values using a loop method

    What are you trying to add through the code? You are not referencing any cells / ranges in your code.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Valued Forum Contributor StevenM's Avatar
    Join Date
    03-23-2008
    Location
    New Lenox, IL USA
    MS-Off Ver
    2007
    Posts
    910

    Re: Code to sum cell values using a loop method

    Re: x = cells(count,0)

    There is no column 0 in a spreadsheet.

    Re: cell(count,10) = total

    It is plural "Cells" and not "cell", even if it refers to only one cell.

    Re: Dim Count

    If your variable is going to hold only whole numbers, then you should use: Dim Count As Long

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1