+ Reply to Thread
Results 1 to 4 of 4

Multiply based on multiple array criteria

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Multiply based on multiple array criteria

    I've got a large set of data and I want to be able to pull out specific values to multiply together given specific criteria.

    To simplify, for all rows in that have value "x" in Column A have "Yes" in column B, I want to find the product of the numerical values in column C for those rows, excluding all rows that do not match both criteria.

    I've been scouring the forums trying to use INDEX, and MATCH functions, but have been having difficulty getting them to work with the necessary products that I am looking for.

    -Thanks in advance for any help

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Multiply based on multiple array criteria

    Function... I think you could, but I'm not 100% sure how without thinking about it more.

    Anyway it's just drag-and-drop with a pivot table, super-easy.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Multiply based on multiple array criteria

    The pivot table does work, but I guess I'll give a little bit more background with what I'm working with.

    I'm collecting data using an external program that writes to excel. The "scanner" will collect data and then writes to excel, and within excel I have it do further calculations to give me essentially a % accuracy of the scan.

    I need to multiply these "% accuracy" values together for all of the values that have the same sample identifier (i.e. "x" in column A), and that the user identifies as a good clean scan (i.e. "yes" in column B), and exclude any samples that the user says to exclude, or belong to a different sample.

    So a pivot table would work, but I need this to run in the background, perform the necessary calculations, and then have the same program that is writing to excel, read the final calculated value for its "report" function, so I can't have need for click and drag, it has to run entirely in the background.

    Thanks for your help though. Is there any way to do what I've described?

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Multiply based on multiple array criteria

    I'm optimistic enough to believe anything is possible with enough ingenuity. I don't know how others would do it, and I'm sure it could all be condensed into a single cell formula if needed (I'm not a fan of big single cell formulas, though), but here's how I'd do it.

    In an adjacent column, add a formula to extract the values. Something like =IF(and(a3=$d$1,c3="y"),b3,1). this will make a column of values, where 1 is holding the place of values to be ignored. then a simple =product(d3:d303) to compute the product.

+ 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