Using the 'If' function to match two columns with the same first three letters of text

Laurence D

New Member
Joined
Sep 14, 2016
Messages
31
Hi all,

I just want to perform a quick quality check on some of my data and I am after a bit of help to make the proper formula as I keep getting too fewer arguments with my formula.
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD="align: center"]1[/TD]
[TD="align: center"]Food Code[/TD]
[TD="align: center"]Food[/TD]
[TD="align: center"]Matches?[/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD="align: center"]MARTOA[/TD]
[TD="align: center"]Marmite[/TD]
[TD="align: center"]Yes[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD="align: center"]JAMTOA[/TD]
[TD="align: center"]Jam[/TD]
[TD="align: center"]Yes[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD="align: center"]HONTOA[/TD]
[TD="align: center"]Marmite[/TD]
[TD="align: center"]No[/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD="align: center"]CORMIL[/TD]
[TD="align: center"]Cornflakes[/TD]
[TD="align: center"]Yes[/TD]
[/TR]
</tbody>[/TABLE]

What I am after is an if formula that will search for the first three letters (to the left) of text in column A1 and see if matches with the first three letters (to the left) of text in column B1. Then if the columns matches to spit out in column C1 a "Yes" or if it does not match then "No".

Thanks,

Laurence
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
you dont need if here, you just say

Code:
=[B]left(a2,3)=left(b2,3)

[/B]
excel will evaluate itself.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,916
Messages
6,181,727
Members
453,064
Latest member
robatthe2A

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