VLOOKUP inside SUMPRODUCT

Elmo Scoggins

New Member
Joined
May 2, 2017
Messages
1
I have been unable to come up with a solution for a complex Excel formula. I have a table for which I use SUMPRODUCT to multiply 2 columns in an array. However, I want to have the formula look at another column in the array, and based on that number do a HLOOKUP to another table, and them multiply the HLOOKUP result with the SUMPRODUCT results. The problem is the lookup needs to be done each time the SUMPRODUCT moves to the next row and I get a #VALUE error. Each part works by itself (=SUMPRODUCT((OFFSET(SDC_var_top:SDC_var_bottom,0,M$42)),((SDC_m2_top:SDC_m2_bottom))) & HLOOKUP((SDC_gen_top:SDC_gen_bottom),'Key Variables'!$B$80:$R$90,(YEAR(N$11)-2009)), with the SDC references being the 1st table, and the 'Key Variable' being the lookup table. SDC_var_top and SDC_var_bottom being the top and bottom reference points for the 1st table and SDC-m2_top and SDC_m2_bottom being the other multiplier in the 1st table, with SDC_gen_top & SDC--gen_bottom being another column in the 1st table, which becomes the lookup value for the lookup table.

All table references are numbers, as are all in the lookup table, other than the reference to YEAR(), which is a date that is converted to a number. Essentially the SUMPRODUCT pulls a number from the 1st table (3rd column) and converts it to a number in the lookup table, which it then multiplies with the other two columns in table 1 and sums the result.

I know its a bit obtuse but I would be happy to explain further if necessary...Any suggestions?
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,224,822
Messages
6,181,165
Members
453,021
Latest member
Justyna P

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