Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4002052
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:58:45+00:00 2026-05-20T07:58:45+00:00

So I have two columns on named program and one with cost values. The

  • 0

So I have two columns on named program and one with cost values. The three programs are ABC, A, B, and C. I want to sum the costs of all programs that contain A. All that contain B. And all that contain C. ABC clearly is included in all the sums. The problem is that to get just these programs the spreadsheet has a filter on it which messes sumif up. Can someone help? Here is an example of what I mean:

program     cost
A           5.00
B           4.00
ABC         9.00
A           2.00

so I would want in three separate cells “sum with A”=16.00, “sum with B”=13.00, “sum with C”=9.00.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T07:58:46+00:00Added an answer on May 20, 2026 at 7:58 am
    Item | Total
    A    | 16
    B    | 13
    C    | 9
    

    Assuming your above range is in A1:B5, my first formula is the following Array formula:

    {=SUM(IF(ISERROR(FIND(B6,$A$1:$A$5)),0,$B$1:$B$5))}
    

    You create an Array formula by entering the formula and holding down the Ctrl+Shift keys while you hit Enter. In my solution, I’ve created an area where I calculate by totals and have a column (called Item in this case) which indicates the letter I see in the original A column.

    If you were trying to enter this using VBA, you would use the FormulaArray property:

    Selection.FormulaArray ="SUM(IF(ISERROR(FIND(B6,$A$1:$A$5)),0,$B$1:$B$5))"
    

    Update

    Restricting the calculation to only visible cells is a bit more complicated. Suppose we have your original data in cells A1:B5. Let’s also suppose our test values start in cell C7 (diagonal to the source data). Our totals formula would look like:

    =SUMPRODUCT(SUBTOTAL(3,OFFSET($B$1:$B$5,ROW($B$1:$B$5)-ROW($B$1),0,1)), --NOT(ISERROR(FIND(C7,$A$1:$A$5))), $B$1:$B$5)
    

    The following portion returns a range over the cells

    OFFSET($B$1:$B$5,ROW($B$1:$B$5)-ROW($B$1),0,1)
    

    This portion returns 1 for each visible cell and 0 for invisible cell

    SUBTOTAL(3,OFFSET($B$1:$B$5,ROW($B$1:$B$5)-ROW($B$1),0,1))
    

    This portion is our criteria. NOT(ISERROR(... will return TRUE or FALSE. The double negative sign -- converts that value into a negative integer and then removes that negation.

    --NOT(ISERROR(FIND(C7,$A$1:$A$5)))
    

    Lastly, the SUMPRODUCT function multiplies the matching arrays to each other and executes the sum. The first two arrays return a series of 0’s or 1’s. If the row is both visible and matches our criteria, then we get 1*1 multipled by the given value in the cell. If the given cell is not visible or does not match the criteria, one of the two return a zero and it zeroes out the entire item.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables one named Person , which contains columns ID and Name
I have two tables named foo and bar , hypothetically speaking. foo has columns
I have two tables with the same columns, and I need to copy one
Hallo all, I have two files, one called part1.txt and another one called part2.txt,
I have a GridPanel with just two columns: names and commission percentages. The sum
I have two tables with the following columns: table1: id, agent_name, ticket_id, category, date_logged
I have two columns in Excel, like this: A B 0.5 0.4 0.6 0.59
I have the following two columns: SELECT b.ip_address AS IP ,b.mask AS MASK FROM
I have two tables with the same columns tbl_source (ID, Title) tbl_dest (ID, Title)
I have a listview with two columns and I'm using a context menu to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.