matching entries, a tricky one

drag-driver

Board Regular
Joined
Feb 18, 2002
Messages
91
My problem is such i have an entry in a colum "2690 - L 6MT1 REG" i want to be able to compare the first 4 digits with a number in another colum and return the value true or false depending on wither they are matched.
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
On 2002-03-26 03:52, drag-driver wrote:
My problem is such i have an entry in a colum "2690 - L 6MT1 REG" i want to be able to compare the first 4 digits with a number in another colum and return the value true or false depending on wither they are matched.

=ISNUMBER(MATCH(LEFT(A1,4)+0,B:B,0))

Substitute the true range in B for B:B.

Aladin
 
Upvote 0
This should do the trick

=IF(LEFT(A1,4)+0=C1,TRUE)

The LEFT(A1,4) extracts the first four characters.
The +0, converts it to number format (LEFT produces text by default)
C1 is where I put the four digit value by itself
Then there's just a bog standard IF around it.

Rgds
AJ
 
Upvote 0
Or, indeed, with COUNTIF:

=COUNTIF(B:B,LEFT(A1,4)+0)>0

Aladin
This message was edited by Aladin Akyurek on 2002-03-26 04:18
 
Upvote 0

Forum statistics

Threads
1,214,583
Messages
6,120,380
Members
448,955
Latest member
BatCoder

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