+ Reply to Thread
Results 1 to 2 of 2

Using variables as part of the "sum" function

  1. #1
    Registered User
    Join Date
    07-31-2010
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Using variables as part of the "sum" function

    Hi,
    this from a complete Excel VBA novice....

    Please Login or Register  to view this content.
    The above code snippet works fine, using the hardcoded column numbers 1 and 9.

    Question: The range of the "sum" function varies in my application, how would I use a variable instead of the hardcoded 1 and 9 ?

    e.g.

    Please Login or Register  to view this content.
    which obviously gives me an error ?
    Last edited by CarlidalRai; 08-01-2010 at 03:32 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Using variables as part of the "sum" function

    Hi and welcome to the board

    Your post does not comply with Rule 3 of our Forum [/I]RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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