Formula to compare 2 cells with different text

shapenote

Board Regular
Joined
Jun 29, 2006
Messages
131
So I am trying to create a formula that compares to different cells to make sure the area assigned is correct. The problem is how the text is written ...

Cell B1 the text reads "Group 55 Region E Area 558"
in Cell B2 the text reads "55E8"

I need a formula that compares B1 to B2 that shows 55E8 is the a match of the Region and Area.

As you can see B1 basically is saying it is Group 55, Region E, Area 8.

Thoughts?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi Shape,

As long as the format of B1 doesn't change this is working for me;

=IF(B2=MID(B1,7,2)&MID(B1,SEARCH("REGION ",B1)+7,1)&RIGHT(B1,1),"Correct","Incorrect")
 
Upvote 0
Another way

=IFERROR(IF(SEARCH(LEFT(B2,2)&"*"&MID(B2,3,1)&"*"&RIGHT(B2,1),B1),"Yes"),"No")

 
Upvote 0
Thoughts?
Could we have a few more examples & results, including some that are incorrect so we can see in what ways they might be incorrect?

I'm asking since, for example, if it was possible to have this ..

B1: Group 55 Region E Area 588
B2: 55E8

.. then both the suggested formulas say this is right but it doesn't look right to me. But perhaps such data is not possible or if it is maybe it is correct anyway? More examples and explanation might help clarify.


Also, are group, region and area always 2, 1 and 1 characters long respectively?

Do the words "Group", "Region" & Area" always appear in B1, and in that order and with no other text apart from the 3 bits of data we are trying to check?
 
Upvote 0

Forum statistics

Threads
1,214,911
Messages
6,122,194
Members
449,072
Latest member
DW Draft

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