Revise Match formula

Column A contains a 7 digit code.
Column B contains a code that could be 1 digit, 2 digits, 3 digits, 4 digits or 5 digits.

Column F contains random Code 2 codes.

The objective is to match the Code 1 from Column A with code 2 from the same row, to the same code 2 in Column F.

This formula worked for another problem but will not work for this problem.
=INDEX(A:B,MATCH(TRIM(F2),B:B,0),1)
Code-attach-file.xlsx
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
How will you say it's a match or No match?? What are the criteria for it??
0
Commented:
change your formula to  =INDEX(A:B,MATCH(TRIM(F2),B:B,0),2)  and it will work.

replace 1 with 2
0
Author Commented:
Hi ProfessorJimJam,

I'm sure it is close, but I cannot make it work.

Thanks,

Greg
Match-formula-problem.JPG
0
Commented:
Greg,

The correct formula will be...

``````=INDEX(A:A,MATCH(F2,B:B,0),1)
``````

Enclosed is your workbook for reference...

Saurabh...
Code-attach-file.xlsx
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Thanks ProfessorJimJam, and Saurabh Singh Teotia.

Great work!

Greg
0
Commented:
Greg,

You are welcome..Always Happy to help.. :-)

Saurabh...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.