+ Reply to Thread
Results 1 to 1 of 1

A macro to create a Sumif formula for different data on a single report

Hybrid View

  1. #1
    Registered User
    Join Date
    07-02-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    1

    A macro to create a Sumif formula for different data on a single report

    Hello All !

    I have a report of which i want to create a macro.
    The formatting should be as seen in the attached file.
    the biggest problem here is to create a macro which will have a general sumif formula, so that, when i put the data for different months in the other sheets, it would capture the exact number of rows to be summed in the sumif formula.

    If i use the existing macro, the number of rows are different and it gives a wrong value.

    Can someone tell me what to do ?

    This is the macro for the sumif formula - please someone explain what it means !

    Range("C3").Select
    ActiveCell.FormulaR1C1 = ""
    Range("C3").Select
    ActiveCell.FormulaR1C1 = _
    "=SUMIF('may ''12'!R[-1]C[-2]:RC[-1],RC[-2],'may ''12'!RC2:C[2])"
    ActiveCell.FormulaR1C1 = _
    "=SUMIF('may ''12'!R[-1]C[-2]:RC[-1],RC[-2],'may ''12'!RC2:RC[2])"
    Attached Files Attached Files

+ 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