Hello,
I have a problem with disapearing zeros..
my formula so far to copy proper numbers to other sheet is:
the problem is that the files that I need to work on have values in column J looking like this:
="00000000"
="029384756"
="000776819"
="284758933"
I need to copy entire rows to my new sheet if value in column J has 9 or 14 characters. The formating makes things difficult.
we can strip those numbers of ="" but than excel is removing leading zeros.
Anybody know how to bypass this?
Best Regards
W.
I have a problem with disapearing zeros..
my formula so far to copy proper numbers to other sheet is:
Code:
Dim cellR As RangeDim lastRowR As Long, r As Long
lastRowR = Range("J" & Rows.Count).End(xlUp).row
r = 2
For Each cellR In Sheets(1).Range("J1:J" & lastRowR)
If Len(cellR) = 9 Or Len(cellR) = 14 Then
cellR.EntireRow.Copy Sheets("SERIAL").Cells(r, 1)
r = r + 1
End If
Next
the problem is that the files that I need to work on have values in column J looking like this:
="00000000"
="029384756"
="000776819"
="284758933"
I need to copy entire rows to my new sheet if value in column J has 9 or 14 characters. The formating makes things difficult.
we can strip those numbers of ="" but than excel is removing leading zeros.
Anybody know how to bypass this?
Best Regards
W.