Summing different VLOOKUP values - one table array, multiple lookup columns

ianalyzethings

New Member
Joined
Aug 5, 2013
Messages
38
I'm trying to sum different vlookup functions using one table array and I'm getting #N/A each.

I'm using just one table array but multiple lookup values along the same row (without getting into too much detail, each product in same row constitutes an equivalent sku to the other products in that same row).

To illustrate, let's say these are the lookup values:

Product # 1Product #2Product #3Product #4
AABB
CCDD
EEFF
GGHH

<TBODY>
</TBODY>

And here's the table array, showing unit sales per product (note BB is blank intentionally):

AA100
BB
CC200
DD250
EE300
FF350
GG400
HH450

<TBODY>
</TBODY>


I want to add up totals for equivalent skus. Based on the above, AA is equiv to BB, CC equiv to DD, EE equiv to FF, GG equiv to HH.

So I tried a simply summing of vlookups: VLOOKUP(Product #1,table array,2,FALSE)+VLOOKUP(Product #1 column, table array,2,FALSE)+VLOOKUP(Product #3,table array,2,FALSE)+VLOOKUP(Product #4,table array,2,FALSE).

I'm getting #N/A for everything. I'm guessing the blanks in either the table array or lookup columns are causing problems, but I've tried adding 0s and it's still not working.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi,

You could use SUMIF instead of VLOOKUP, or wrap the VLOOKUPs in IFERROR functions to return zero's.

Alternatively, you can try an approach like this (adjust the ranges as required):

Excel 2013
ABCDEFGH
1Product # 1Product #2Product #3Product #4AA100
2AABB100BB
3CCDD450CC200
4EEFF650DD250
5GGHH850EE300
6FF350
7GG400
8HH450

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
E2=SUMPRODUCT(
SUMIF(G$1:G$8, A2:D2, H$1:H$8)
)

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,839
Members
449,051
Latest member
excelquestion515

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