Range of data with a vlookup condition

Pumpk1n

Board Regular
Joined
Jan 31, 2017
Messages
86
Office Version
  1. 365
Platform
  1. Windows
I have a tab in a workbook which contains Recoveries. In that tab, Column B may contain values such as "March 2016" or "April 2016" etc..."

I am working in my tab called "June 2016 and I only want to include the values from the Recoveries tab if the values Match. Is there a way to do that? This is the formula I am using and it's not working correctly.

=IFERROR(IF(Recoveries!B14="June 2016",VLOOKUP(B15,Recoveries!$C$2:D100012,2),0),0)
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
vlookup will always only ever return the 1st match - then stop looking. You need something a bit more complex to return multiple matches. Assuming your data looks something like this...
A​
B​
C​
D​
E​
F​
G​
1​
Nameblah1blah2aablah1blah2
2​
aa
10​
aa10
10​
aa10
3​
bb
20​
bb20
40​
aa40
4​
cc
30​
cc30
70​
aa70
5​
aa
40​
aa40
6​
bb
50​
bb50
7​
cc
60​
cc60
8​
aa
70​
aa70
9​
bb
80​
bb80
10​
cc
90​
cc90
E1 contains your criteria
F2=IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$10=$E$1,ROW($A$2:$A$10)),ROWS($A$1:A1))),"")
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}. Note: Do not try to enter the {} manually yourself.
Copy down, then copy across as needed
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

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