Formula to return only one value based on criteria

Godwin117

Board Regular
Joined
Dec 19, 2019
Messages
68
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I have below formula I can't seem to get to work and can't find anything online about it. A brief explanation of it is: If data from B5:B50 is equal to AUTH!A:A, it'll continue otherwise it will return blank. <It only needs to match one instance of that data, not every instance of the data. > If data from AUTH!E:E is already in F:F, then have it blank, otherwise lookup data from AUTH!A:E using $B$5:B$50 data to find the data in column 5. Any help will be greatly appreciated.

Formula is below:

=IF($B$5:$B$50 = AUTH!A:A, IF(SUMPRODUCT((AUTH!E:E = F:F))>1, "", VLOOKUP($B$5:$B$50, AUTH!A:E, 5, FALSE))"")
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I found your description to be confusing, which is probably why you haven't had any replies so far. This is a case where an example would help. In any case, given this sheet named AUTH:

Book2
ABCDE
1A HeaderB HeaderC HeaderD HeaderE Header
2aaaaaaaaaaaaaaa
3bbbbbbbbbbbbbbb
4ccccccccccccccc
5ddddddddddddddd
6eeeeeeeeeeeeeee
7
AUTH


I came up with this basic IFERROR(VLOOKUP formula:

Book2
ABC
1
2
3
4My CodesResult
5bbbbbb
6o 
7x 
8cccccc
9aaaaaa
10r 
11s 
12
Sheet8
Cell Formulas
RangeFormula
C5:C11C5=IFERROR(VLOOKUP(B5,AUTH!$A$2:$E$6,5,FALSE),"")


It does mostly what you want, although I couldn't figure out what you wanted to do with column F. Let us know how close this is to your actual request.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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