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

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
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...
[Table="width:, class:grid"][tr][td] [/td][td]
A​
[/td][td]
B​
[/td][td]
C​
[/td][td]
D​
[/td][td]
E​
[/td][td]
F​
[/td][td]
G​
[/td][/tr]
[tr][td]
1​
[/td][td]Name[/td][td]blah1[/td][td]blah2[/td][td][/td][td]aa[/td][td]blah1[/td][td]blah2[/td][/tr]

[tr][td]
2​
[/td][td]aa[/td][td]
10​
[/td][td]aa10[/td][td][/td][td][/td][td]
10​
[/td][td]aa10[/td][/tr]

[tr][td]
3​
[/td][td]bb[/td][td]
20​
[/td][td]bb20[/td][td][/td][td][/td][td]
40​
[/td][td]aa40[/td][/tr]

[tr][td]
4​
[/td][td]cc[/td][td]
30​
[/td][td]cc30[/td][td][/td][td][/td][td]
70​
[/td][td]aa70[/td][/tr]

[tr][td]
5​
[/td][td]aa[/td][td]
40​
[/td][td]aa40[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
6​
[/td][td]bb[/td][td]
50​
[/td][td]bb50[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
7​
[/td][td]cc[/td][td]
60​
[/td][td]cc60[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
8​
[/td][td]aa[/td][td]
70​
[/td][td]aa70[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
9​
[/td][td]bb[/td][td]
80​
[/td][td]bb80[/td][td][/td][td][/td][td][/td][td][/td][/tr]

[tr][td]
10​
[/td][td]cc[/td][td]
90​
[/td][td]cc90[/td][td][/td][td][/td][td][/td][td][/td][/tr]
[/table]

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,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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