Results 1 to 6 of 6

SUM on varying number of cells in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    12-30-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    3

    SUM on varying number of cells in VBA

    I am writing sum of few cells from the row above, to a single cell and then merging the cells
    I need to achieve this in vba but the problem is that the number of columns I need to use in the SUM formula can change month by month, though I know how many columns are there in each month (See attached excel) and I am using A1 style to write formula in my code. I couldn't find any way to write formula in vba in such a way that you can change column name to variable (so that first sum covers C2 - C6, second covers C7 - C10 etc.).
    Any help will be highly appreciated.
    Attached Files Attached Files

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