+ Reply to Thread
Results 1 to 5 of 5

SUMIF Formula needs to be copy to column and row

  1. #1
    Registered User
    Join Date
    07-06-2012
    Location
    mmoresou
    MS-Off Ver
    Excel 2008 MAC
    Posts
    2

    SUMIF Formula needs to be copy to column and row

    I need to compile data from the same workbook but different sheet with SUMIF formula

    The three three SUMIF formulas are all correct, however I don't know how to implant the same data for different column and row:

    formula 1:
    =SUMIF(January!C4:C10,B11,January!D4:D10)+SUMIF(January!G4:G10,B11,January!H4:H10)+SUMIF(January!K4:K10,B11,January!L4:L10)

    Change/copy to next column, criteria NO change but range and sum-range for Month change to February, March, .... November and December.

    Change/copy to next row, criteria Change to B12, B13....B19, B20. Range and sum_range do NOT change.



    Formula 2:
    =SUMIF(January!C14:C16,B23,January!D14:D16)+SUMIF(January!G14:G16,B23,January!H14:H16)+SUMIF(January!K14:K16,B23,January!L14:L16)


    Formula 3:
    =SUMIF(January!C20:C29,B30,January!D20:D29)+SUMIF(January!G20:G29,B30,January!H20:H29)+SUMIF(January!K20:K29,B30,January!L20:L29)


    Formula 2&3 are basically the same just compelling different data. Again, the same how to:
    Change/copy to next column, criteria NO change but range and sum-range for Month change to February, March, .... November and December.

    Change/copy to next row, criteria Change to B24, B25....B27, B28. Range and sum_range do NOT change.


    See attached file, all pink are the one needs to be filled in. Many thanks!SUMIF Problem.xlsSUMIF Problem.xls

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: SUMIF Formula needs to be copy to column and row

    A formula does note adjust the sheet names when copied across.

    You can use Indirect() to reference the sheet name if it is stored somewhere in the spreadsheet, and then combine that with Row() to let the row numbers update when copied down. See attached file for an example with a simple sum formula.
    Attached Files Attached Files
    Like a post? Click the star below it!

  3. #3
    Registered User
    Join Date
    07-06-2012
    Location
    mmoresou
    MS-Off Ver
    Excel 2008 MAC
    Posts
    2

    Re: SUMIF Formula needs to be copy to column and row

    Quote Originally Posted by npamcpp View Post
    A formula does note adjust the sheet names when copied across.

    You can use Indirect() to reference the sheet name if it is stored somewhere in the spreadsheet, and then combine that with Row() to let the row numbers update when copied down. See attached file for an example with a simple sum formula.
    But my problem is, the data that is input for Sheet January-December are if certain data are entered, then it will appear in categories of summary: SUMIF(January!$C4:$C10,$B11,January!$D4:$D10)

    If to use indirect, then data has to be in fixed cell. Any other suggestions? Many thanks!

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: SUMIF Formula needs to be copy to column and row

    Welcome to the forum, adaliu7. Please read the following:

    Rule 12: Don't quote whole posts -- it's just clutter. If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding.

  5. #5
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: SUMIF Formula needs to be copy to column and row

    You can use Indirect(), but you really need to take care when constructing the formula.

    Your data layout does not easily support summarizing. Change your data layout to a simpler format and you can use simpler formulas.

+ 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