+ Reply to Thread
Results 1 to 8 of 8

Using OFFSET and/or COUNTA within SUMPRODUCT Function

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Using OFFSET and/or COUNTA within SUMPRODUCT Function

    Is it possible to use an OFFSET and/or COUNTA formula within a SUMPRODUCT formula? I am using a SUMPRODUCT formula, which is using rows 13-33. I want the array to always start in row 13 but the last row is always changing (i.e. today the last row of data is row 33 but next week the last row might be row 1000. Can I build something into the formula to account for this? I've attached a sample of how the data is layed out (current formula is in D2:D6).

    Please Login or Register  to view this content.

  2. #2
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    explore the feature of Excel Table - they offer auto-extension of ranges when used within formulae.
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  3. #3
    Registered User
    Join Date
    10-21-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    I've looked into the excel and made some change to the formula.

    In the formula, I used column A as reference, that means column A value cannot be blank until last row.
    Hope this suit to your need.

    The current fomula in D2 is now as below:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Here is the edited excel file:
    Excel Tip - Offset within Sumproduct Formula.xls
    Last edited by Nels; 10-21-2012 at 12:47 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    In reference to the "Excel Table" feature solution, expect for one issue, this works perfect. The only comment I have, and not sure how to address/fix, is that whenever I add a new row of information, the font with formulas automatically changes to "MS Sans Serif". Is there a way to avoid this? Thanks again for comments.

  5. #5
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    Sorry the issue was for the solution to use the "Excel Table" feature....once a start a new row of data the cells with the formulas changes to MS Sans Serif font from Arial. Not sure why this is happening. Thanks in advance for any comments.

  6. #6
    Registered User
    Join Date
    10-21-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    I cannot reproduce the issue, don't know why the issue happens.

    Would you mind attaching the excel file which the issue happens(or that's the file I just uploaded)?
    Also if you can provide a reproduce step that can be helpful to troubleshoot the issue. Thanks

  7. #7
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    Attached is copy of sample. When I start entering new line of data, the font style changes. No big deal, I can work around it but just curious as to why the style would change.

  8. #8
    Registered User
    Join Date
    10-21-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    45

    Re: Using OFFSET and/or COUNTA within SUMPRODUCT Function

    I canceled the form auto expend function then the font does not change anymore
    , the issue can because of the auto expend function setting.
    (However, you will find that the form style such as lines will not auto assign in new filled row, this is the con of the solution)

    Hope this helps.

+ 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