Picking Values from a Table

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Hi All

I am inputting values into row 2 under certain labels. Each label has a value which corresponds with the values in table A5:B9. The total is then shown in cell B12 (product of a multiplication).

I am trying to remove the intermediate step which requires table D12:E16. I assume a MATCH / INDEX / HLOOKUP or SUMPRODUCT formula may be the answer but I'm not sure.

There are only 5 labels shown here but I need the flexibility to expand.

Thanks





Book1
ABCDE
1ABCDEFGHIJKLMNO
220506
3
4
5ABC16.1
6DEF12.8
7GHI15.4
8JKL11.4
9MNO12.5
10
11
12Total184.2ABC32.2
13DEF0.0
14GHI77.0
15JKL0.0
16MNO75.0
Sheet2
Cell Formulas
RangeFormula
B12=SUM(E12:E16)
E12=A2*B5
E13=B2*B6
E14=C2*B7
E15=D2*B8
E16=E2*B9
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
How about
=SUMPRODUCT((A1:E1=A5:A9)*(A2:E2)*(B5:B9))
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0
Hi Fluff

I've found one small issue. If the values in B5:B9 are arrived at using a formula, I get the #Value ! error.

Is there a way around this so that I can use the values that are from a formula ?

Thanks
 
Upvote 0
The fact that you have formulae in B5:B9 shouldn't make any difference, unless one or more of them is returning #VALUE ! or "", in which case you need to change that formula so that it returns 0
 
Upvote 0
Correct again Fluff. I did have an IF statement that returned a "" if true. I have now changed this to return 0.

All works fine again thanks.
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,703
Messages
6,173,973
Members
452,540
Latest member
haasro02

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top