+ Reply to Thread
Results 1 to 5 of 5

SumProduct, IsNumber, and asterisk

  1. #1
    Registered User
    Join Date
    09-11-2019
    Location
    Arlington, Texas
    MS-Off Ver
    365 ProPlus
    Posts
    2

    SumProduct, IsNumber, and asterisk

    Hi all,
    I am trying to add all numbers in one column IF that row contains a string in a different column, whether it is an exact match or not. (The reference cells are also on another sheet, and the column can be filtered and sorted in all manners).

    This formula works great:

    =SUMPRODUCT(--(Wife!$J:$J="Phone"),Wife!$D:$D)

    The cell containing the category "Phone" is unique, but not all are. Some categories are split, ie "Vending - Work" and "Vending - Entertainment".

    I am having trouble getting the sum for ALL of the "Vending" categories, whether the cell is "Vending - Work" or "Vending - Entertainment".

    This formula is functional, but gives the wrong sum:

    =SUMPRODUCT(--(Wife!$J:$J=(ISNUMBER(SEARCH("Vending*",Wife!$J:$J)))),Wife!$D:$D)

    The function above is returning $8,794.50, where it should be $127.35
    (All of the charges in that sub-category are between $.75 and $2.10)

    Here is a screenshot of the row in question:
    Row.jpg

    (Brief explanation of the Workbook:
    I have all of our Bank transactions listed by account, with dates, descriptions, debits & credits, etc etc
    I am trying to find how much we have spent in each category I've assigned to each transaction. Most have been easy, anything to fo with our phones is in the "Phone" category. Yet, other things belong to more than one category. Ie, "Vending - Work" and "Vending - Entertainment". I am trying to figure out our budget for each category, but they need to stay separated in their subcategories because anything we spend on business trips will eventually be reimbursed, but we have to budget for it all in order to have the cash at the time of purchase.)
    Column I= Category
    Column J= Sub-Category
    K= =SUMPRODUCT(--($I:$I="Food"),$D:$D)
    L= =SUMPRODUCT(--($I:$I="Food"),$E:$E)
    M= =(K14-L14)

    Thanks so much!

    TL:DR?
    How do I use an asterisk within the ISNUMBER(SEARCH function to find all instances of a string of text, when that whole function is also within the SUMPRODUCT function?

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: SumProduct, IsNumber, and asterisk

    You have over-thought the formula, all you need is

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: SumProduct, IsNumber, and asterisk

    I over-thought it as well, a simple SUMIFS suffices

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: SumProduct, IsNumber, and asterisk

    To use "sumif" will be 1 charactor shorter in formula....

  5. #5
    Registered User
    Join Date
    09-11-2019
    Location
    Arlington, Texas
    MS-Off Ver
    365 ProPlus
    Posts
    2

    Re: SumProduct, IsNumber, and asterisk

    Thank you Bob, the second formula worked! I didn't know the SUMIFS function existed (to use SUMIF, I had to change the formula completely, but it works if there is only one criteria. Thanks CABYYC!)
    The first formula isn't accepted (missing a close parenthesis before the ,Wife!$J:$J) but even that corrected, it still gives me the $8,794.50 result. I am still curious to know why my convoluted monstrosity is wrong, though. I've tried it for different criteria, as well, and some result in a much larger number than it should, and some result in a much smaller number.
    And to know how to get that darned asterisk to function properly.

    Thanks!

+ 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. Numbers before 1st asterisk, 2nd asterisk, 3rd asterisk
    By stephme55 in forum Excel General
    Replies: 1
    Last Post: 08-23-2016, 12:57 AM
  2. [SOLVED] SumProduct, IsNumber formulas possible to filter multiple column and row criteria?
    By matt303 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-06-2016, 10:35 AM
  3. [SOLVED] Summation across row using sumproduct/isnumber/match and named array(s)
    By samuk1000 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2013, 02:24 AM
  4. Isnumber nested with sumproduct
    By dastgir in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-02-2012, 07:28 AM
  5. [SOLVED] how to have multiple ISNUMBER search function in SUMPRODUCT
    By melvyndb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2012, 09:34 PM
  6. SUMPRODUCT contains text, using asterisk
    By commander1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-09-2009, 04:23 PM
  7. SUMPRODUCT((ISNUMBER(SEARCH() function
    By redneck joe in forum Excel General
    Replies: 13
    Last Post: 12-08-2006, 06:19 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