Reputation: 41
I have an Excel table which contains 10 columns with object parameter values, every column has a label in the first row with a parameter name, and in the 11th column I have indicated the class to which the object belongs. I am trying to make a formula which can calculate the sum of parameter values for an object given a parameter name and class name. I need to chose a parameter name in a list field and class name in a list field and get the sum.
Upvotes: 1
Views: 3052
Reputation: 22842
Create the two ListBoxes and then create a Linked Cell for each of them, the following formula uses N1 for the parameter Linked Cell, and O1 for the class Linked Cell.
=SUMIF(K:K, O1, INDIRECT(ADDRESS(1, MATCH(N1, A1:J1, 0))))
Upvotes: 1
Reputation: 8941
I am not 100% clear on the question, so I asume the following
The easiest would be to place an Autofilter on the header row and create a SUBTOTAL(109, ...) for sum or SUBTOTAL(102, ...) for count below the list for each parameter. Then filter the class and look up the total sum/count for each parameter.
An alternative would be to create a pivot table with P1 .. P10 in the data area (count or sum) and class as a page field .... then again you may select a distinct class and parameter to narrate the results
Finally, you can use the DSUM(), DCOUNT() or DCOUNTA() functions with
Hope that helps - good luck MikeD
Upvotes: 0