Forum Discussion

Carl_W's avatar
Carl_W
Copper Contributor
May 06, 2021
Solved

One cell formula tabulating/referencing a table

Hi gang!  Can you all help me consolidate a formula?  I'm counting instances from one column of data on Tab-1, then grabbing a referenced power value from Tab-2 but sweeping through all component options available for a total.  So the components are on Tab-1 and the power table on Tab2. 

 

Tab-1 has cells C8 through C49.  Within those cells will be various components, all of which can be found in the power table on Tab-2.  Each cell contains a name of a component.  In some cases, it could be numerous counts of one component and zero of others.

 

Tab-2 power table is located in  cells C5 to D17.  Column C will have the name of available components, Column D the related power value.

 

In Tab-1, I count the number of cells containing each particular component, then I grab the power value of each from Tab-2, multiply and add them for a total power of that column.

 

There's got to be a way to simplify this equation, but here's what I'm using for now:  

 

=COUNTIF(C8:C49,Power!$C$5)*Power!$D$5 +COUNTIF(C8:C49,Power!$C$6)*Power!$D$6 +COUNTIF(C8:C49,Power!$C$7)*Power!$D$7 +COUNTIF(C8:C49,Power!$C$8)*Power!$D$8 +COUNTIF(C8:C49,Power!$C$9)*Power!$D$9 +COUNTIF(C8:C49,Power!$C$10)*Power!$D$10....

2 Replies

    • Carl_W's avatar
      Carl_W
      Copper Contributor
      Thank you! I knew I'd be embarrassed once I saw the solution!!!