+ Reply to Thread
Results 1 to 4 of 4

SUMPRODUCT with skipping columns

  1. #1
    Registered User
    Join Date
    09-05-2017
    Location
    Dubai
    MS-Off Ver
    2017
    Posts
    5

    SUMPRODUCT with skipping columns

    Good day

    A workbook contains 2 sheets.
    Sheet 1 (REGISTER) contains a service register ID;
    Sheet 2 (PLAN) contains the planned allocation of resources in each week of each month.
    I would like to be able to have the total planned effort for each service by month in the REGISTER, however as the PLAN sheet has 4 columns for each month, when I copy the formula in the REGISTER sheet, the column reference moves from C:F to D:G instead of C:F to G:J.

    Formula in Month 1 of REGISTER =SUMPRODUCT((PLAN!$A$3:$A$7=REGISTER!$A2)*PLAN!C$3:F$7)
    Copied formula in Month 2 of REGISTER =SUMPRODUCT((PLAN!$A$3:$A$7=REGISTER!$A2)*PLAN!D$3:G$7)

    The correct formula in Month 2 should be =SUMPRODUCT((PLAN!$A$3:$A$7=REGISTER!$A2)*PLAN!G$3:J$7)
    and in Month 3 it should be =SUMPRODUCT((PLAN!$A$3:$A$7=REGISTER!$A2)*PLAN!K$3:N$7)


    I need the cell reference to consider when I copy the formula to the next month it considers the skipping of columns.

    Thank you
    Junaid
    Last edited by jhansrod; 02-24-2018 at 01:38 AM. Reason: Set to SOLVED

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUMPRODUCT with skipping columns

    Hi jhansrod. Welcome to the forum.

    With the understanding that you will be referencing 12 months of data the source range would run across C$3:AX$7.
    It also sounds like you want the output to run across columns A:L.

    With that understanding replace that 4 column problem range (PLAN!C$3:F$7) to a dynamic range

    INDEX(PLAN!C$3:AX$7,,(COLUMNS($A$1:A$1)-1)*4+1):INDEX(PLAN!C$3:AX$7,,(COLUMNS($A$1:A$1)-1)*4+4)

    That will increment references by 4 columns with each column of output.

    If that does not work you will need to upload a representative sample Excel file ... not screenshots or pics; saves retyping data.

    Here's how to do it:

    To attach a file to your post,
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.
    Dave

  3. #3
    Registered User
    Join Date
    09-05-2017
    Location
    Dubai
    MS-Off Ver
    2017
    Posts
    5

    Thumbs up Re: SUMPRODUCT with skipping columns

    Hi FlameRetired

    Thanks for the quick turnaround. The guidance was great and it only needed a small tweak to get it working.

    INDEX(PLAN!$C$3:$AX$7,,(COLUMNS($A$1:A$1)-1)*4+1):INDEX(PLAN!$C$3:$AX$7,,(COLUMNS($A$1:A$1)-1)*4+4)

    I have attached the working sample for reference.

    Regards
    Junaid
    Attached Files Attached Files

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUMPRODUCT with skipping columns

    Good work and nice catch on the absolute referencing error of mine.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sum skipping columns
    By Steve in forum Excel General
    Replies: 8
    Last Post: 10-17-2021, 11:36 PM
  2. copy values from columns to rows while skipping empty columns...
    By EricCy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2016, 06:20 AM
  3. IF(MOD) for skipping columns
    By rhudgins in forum Excel General
    Replies: 5
    Last Post: 07-31-2010, 02:16 AM
  4. Sumproduct, skipping columns, addition
    By jayclinton in forum Excel General
    Replies: 2
    Last Post: 12-29-2008, 07:12 PM
  5. [SOLVED] Skipping Columns
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2006, 06:08 PM
  6. [SOLVED] Skipping cells when using SUMPRODUCT function
    By Jason in forum Excel General
    Replies: 2
    Last Post: 06-08-2006, 09:35 AM
  7. skipping columns
    By Wazooli in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2005, 02:06 PM

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