PDA

View Full Version : Match 1st ?? in column vertically, if Yes, then see if 2nd ?? matches horizontally?



RINCONPAUL
05-04-2016, 03:31 PM
Looking for a function to insert in $D2..., that asks the question, " Vlookup $A2 in F:F and if a match, hlookup along same row as first match, columns G:J and see if $B2 matches any value in that row?" Return "YES" if a match in F:F and a match in same row, columns G:J. "NO" if no match found.

Cheers

p45cal
05-04-2016, 05:25 PM
In your file, in D2:
=IF(ISNA(MATCH(VALUE($B2),OFFSET($G$1,MATCH($A2,$F$2:$F$8,0),0,,4),0)),"NO","YES")
copied down.

RINCONPAUL
05-04-2016, 05:57 PM
Champion!...thanks Pascal, brilliant as always.
:beerchug:

RINCONPAUL
05-09-2016, 04:28 PM
Pascal, I need an Add-On? This formula works great, but in the instance that it finds no records in Col F to Match, it will still produce a "NO". I'd prefer a " ". This will give an option 3, which is that there are no records to match. I can't use IFERROR, as it doesn't throw one?
Cheers

RINCONPAUL
05-10-2016, 12:39 AM
Pascal, I sorted it:
=IFERROR(IF((MATCH($A9,$F$2:$F$10,0))<>"",IF(ISNA(MATCH(VALUE($B9),OFFSET($G$1,MATCH($A9,$F$2:$F$10,0),0,,4),0)),"NO","YES")),"")

No doubt you could improve on it in a Master Class moment?