Check first 5 Char in text field

dave46049

New Member
Joined
Feb 24, 2010
Messages
16
Folks, I have two columns of data that have text in - lets say the text reads "12345acbdefghigj" - ovviously the numbers and char change for each row.

Is there a function which can compare the first 5 characters of data in each column and return a true / false flag [ or the first 5 char of data?

Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
I need to check whether the first five characters are in ANY row in column B

So I guess I'm looking for something like =LEFT(A1,5)=LEFT(B1-B500,5):confused:
 
Upvote 0
Biff - where does this one reference the first 5 char of columnB?
In the criteria:

LEFT(A1,5)&"*"

Book1
ABC
112345xxasdfghj4
2_12345zx_
3_dfghytu_
4_12345ui_
5_12345oop_
6_12346we_
7_qwertyu_
8_uioklpp_
9_ercvbnh_
10_12345xx_
Sheet1

Formula entered in C1:

=COUNTIF(B:B,LEFT(A1,5)&"*")
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,550
Members
452,927
Latest member
rows and columns

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