select digit 3n dc

as show here

111111111111111111hhhhhhhhhh.PNG
here the file
29088846a__3n_bro_dc_to.xlsb
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?
 
Subodh Tiwari (Neeraj)Connect With a Mentor Excel & VBA ExpertCommented:
Please give this a try...

Sub DC()
Dim lr As Long, i As Long, j As Long
Dim x, y()
Dim NumStr As String
Application.ScreenUpdating = False

lr = Cells(Rows.Count, "BY").End(xlUp).Row
x = Range("BW7:BY" & lr).Value
ReDim y(1 To UBound(x, 1), 1 To 1)

For i = 1 To UBound(x, 1)
    If x(i, 1) <> "" And x(i, 3) <> "" Then
        If IsNumeric(x(i, 1)) And IsNumeric(x(i, 3)) Then
            NumStr = Left(x(i, 1), 1) & Left(x(i, 3), 1)
            y(i, 1) = OrderNumber(NumStr)
        End If
    End If
Next i
Range("CD7:CD" & lr).NumberFormat = "@"
Range("CD7").Resize(lr, 1).Value = y
Application.ScreenUpdating = True
End Sub

Open in new window

29088846a__3n_bro_dc_to.xlsb
1
 
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Great Job

Best Expert !!
1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.