+ Reply to Thread
Results 1 to 8 of 8

how to ignore text in a sumproduct, index, and match formula.

Hybrid View

  1. #1
    Registered User
    Join Date
    08-05-2013
    Location
    new york city, new york
    MS-Off Ver
    Excel 2011
    Posts
    20

    how to ignore text in a sumproduct, index, and match formula.

    Hi Everyone,

    This is my formula:

    =SUMPRODUCT(INDEX('Report'!$D$6:$O$28*(MOD(ROW('Report'!$D$6:$O$28),2)),0,MATCH(BULK$C$10,months,0)))

    So the above formula sums every other row within the range in the column i choose. I choose the column by inputing my column choice in cell C10 in tab BULK.

    Now some cells in the range include text that I would like to exclude when i sum so I dont get a #Value!

    Can anyone help please?

    Thanks,

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: how to ignore text in a sumproduct, index, and match formula.

    Hi,

    Can you upload your workbook since SUM & SUMPRODUCT generally ignore text anyway so I'm struggling to understand the problem.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792

    Re: how to ignore text in a sumproduct, index, and match formula.

    When you use * to multiply that causes a #VALUE! error if there's any text in 'Report'!$D$6:$O$28 because you can't multiply by a text value, try changing the syntax to this:

    =SUMPRODUCT(INDEX('Report'!$D$6:$O$28,0,MATCH(BULK$C$10,months,0)),MOD(ROW('Report'!$D$6:$O$28),2))
    Audere est facere

  4. #4
    Registered User
    Join Date
    08-05-2013
    Location
    new york city, new york
    MS-Off Ver
    Excel 2011
    Posts
    20

    Re: how to ignore text in a sumproduct, index, and match formula.

    Hi,

    So for some reason i tried using the formula and it didnt work for me.

    Below is the workbook I am working on.

    The yellow box is where I type in the month I want and the red boxes represent the information I am trying to find. So in the even rows box, I want it to sum all the even rows for a particular month and in the odd rows box i want it to sum all the odd rows for that particular month.

    Please help!

    Sample Workbook.xlsx

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792

    Re: how to ignore text in a sumproduct, index, and match formula.

    The syntax works but you need to adjust the references for the setup in your sample - this formula will give the sum of the odd rows for the relevant month

    =SUMPRODUCT(INDEX(A2:L27,0,MATCH(O7,A1:L1,0)),MOD(ROW(A2:L27),2))

    and for the even rows

    =SUMPRODUCT(INDEX(A2:L27,0,MATCH(O7,A1:L1,0)),1-MOD(ROW(A2:L27),2))

  6. #6
    Registered User
    Join Date
    08-05-2013
    Location
    new york city, new york
    MS-Off Ver
    Excel 2011
    Posts
    20

    Re: how to ignore text in a sumproduct, index, and match formula.

    Daddylonglegs, would you know how to change the formula in order to sum every third cell within the column range?

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,051

    Re: how to ignore text in a sumproduct, index, and match formula.

    Based on the data you provided, try this.

    Add a helper column at he end and use this, copied down...
    =MOD(ROW(),2)
    Then for the even rows, use this...
    =SUMIFS(OFFSET($A$1,1,MATCH($O$7,$A$1:$L$1,0)-1,26,1),$M$2:$M$27,0)
    change the ,0) at the end to ,1) for odd
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Registered User
    Join Date
    08-05-2013
    Location
    new york city, new york
    MS-Off Ver
    Excel 2011
    Posts
    20

    Re: how to ignore text in a sumproduct, index, and match formula.

    Thank you so much daddylonglegs! It worked!

    Thank you to everyone else as well

+ 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] An INDEX MATCH formula has blank cell - need to ignore or delete
    By rls231 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-26-2013, 11:13 PM
  2. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  3. [SOLVED] VBA or formula. match, index and sumproduct
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-18-2012, 02:46 PM
  4. Index/Match or Sumproduct formula
    By pauldaddyadams in forum Excel General
    Replies: 5
    Last Post: 01-19-2012, 11:32 AM
  5. Sumproduct, or Index / Match Formula
    By bountifulgrace in forum Excel General
    Replies: 6
    Last Post: 11-03-2006, 04:55 PM

Tags for this Thread

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