match is finding correct row. you have more than one pamela so it returns first one it finds in your example its finding Pamela in b12
not pamela in b31 same with frank and david