A better way of doing this vlookup?

rfinnegan

Board Regular
Joined
Mar 15, 2005
Messages
173
Office Version
  1. 365
Platform
  1. Windows
Hi All:

I'm trying to create a worksheet that will show the sum of 4 other worksheets. Each of the 4 worksheets has 70-80 items on it and no 2 worksheets have all the same items.

I'm using the following vlookup to perform the process. My question -- is there a better way to do this?

=IF(ISNA(VLOOKUP(C2,'Br PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Br PLU'!C1:H100,3,0))+IF(ISNA(VLOOKUP(C2,'Sto PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Sto PLU'!C1:H100,3,0))+IF(ISNA(VLOOKUP(C2,'Sixth PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Sixth PLU'!C1:H100,3,0))+IF(ISNA(VLOOKUP(C2,'Pas PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Pas PLU'!C1:H100,3,0))

Thanks in advance
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
That's about as good as I can get. If you have excel 2007 or newer, you can shorten it a little bit with this:

=IFERROR(VLOOKUP(C2,'Br PLU'!C1:H100,3,0),0)+IFERROR(VLOOKUP(C2,'Sto PLU'!C1:H100,3,0),0)+IFERROR(VLOOKUP(C2,'Sixth PLU'!C1:H100,3,0),0)+IFERROR(VLOOKUP(C2,'Pas PLU'!C1:H100,3,0),0)
 
Upvote 0
Hi All:

I'm trying to create a worksheet that will show the sum of 4 other worksheets. Each of the 4 worksheets has 70-80 items on it and no 2 worksheets have all the same items.

I'm using the following vlookup to perform the process. My question -- is there a better way to do this?

=IF(ISNA(VLOOKUP(C2,'Br PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Br PLU'!C1:H100,3,0))+IF(ISNA(VLOOKUP(C2,'Sto PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Sto PLU'!C1:H100,3,0))+IF(ISNA(VLOOKUP(C2,'Sixth PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Sixth PLU'!C1:H100,3,0))+IF(ISNA(VLOOKUP(C2,'Pas PLU'!C1:H100,3,0)),0,VLOOKUP(C2,'Pas PLU'!C1:H100,3,0))

Thanks in advance
This formula is much shorter but uses the volatile function INDIRECT.

=SUMPRODUCT(SUMIF(INDIRECT("'"&{"Br","Sto","Sixth","Pas"}&" PLU'!C1:C100"),C2,INDIRECT("'"&{"Br","Sto","Sixth","Pas"}&" PLU'!E1:E100")))
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,258
Members
452,901
Latest member
LisaGo

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