Excel not detecting a string of zeros (000...n) before the number "n"

apace

New Member
Joined
Jun 28, 2021
Messages
8
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I am trying to find the repeats in the column new and Excel is not recognizing th 0's in front, causing values such as "001" and "01" to be considered the same.

I am separating the first three characters from the code in idetificator and checking if they are occurring in the "allowed list". Then I separate the rest of the code and put it in new.

How do I create a formula that works for repeats since the one I'm using now is not working for values starting with "0"



Here is a better example (the code row has almost 10000 more cells, so it's just a small example):

Code [given]identificator =IF(COUNTIF(Table3[allowed];LEFT(A2;3)&"*")>0;
LEFT(A2;3);"None")
new
=MID(A2;IF(MID(A2;4;1)="-";5;4);LEN(A2))
repeats
=COUNTIF(Table1[[#All];[new]];[@[new]])
123ABC123123ABC1231
999-00010999000103
989-000001098900000103
989-0019890013
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
COUNTIF is helpfully(!) converting text that looks like a number into a number.

One alternative: =SUM(--([new]=[@new]))
 
Upvote 0

Forum statistics

Threads
1,215,432
Messages
6,124,860
Members
449,194
Latest member
HellScout

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