Hi
Say your data is on sheet1, column A.
Option 1:
In sheet2 array enter (shift, ctrl, enter) the formulas
A1: =IF(ROW()>SUMPRODUCT(--(LEN(Sheet1!$A$1:$A$3500)<4)),"",INDEX(Sheet1!A:A,SMALL(IF(LEN(Sheet1!$A$1:$A$3500)<4,ROW(Sheet1!$A$1:$A$3500),""),ROW())))
B1: =IF(ROW()>SUMPRODUCT(--(LEN(Sheet1!$A$1:$A$22)<4)),"",SMALL(IF(LEN(Sheet1!$A$1:$A$22)<4,ROW(Sheet1!$A$1:$A$22),""),ROW()))
Copy them down as required. This will give a list of the ids and the row on which they appear. If you have a lot of blank rows at the bottom, then they will appear. Also blank rows will appear in this list as 0.
Option 2: Instead of a macro, on sheet 1 create a column that determines if the length of the ID is correct. Something like
=IF(LEN(A1)<4,"yes","")
Depending on your setup, you could then use an autofilter to show those items that have yes. Up to you how you then process them.
Option 3:
The code below will output a list of the account numbers and their row to sheet3.
rylo
Bookmarks