Your technology certification is waiting. Enroll in Cloud Class ®
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)
Range("CD7:CD" & lr).NumberFormat = "@"
Range("CD7").Resize(lr, 1).Value = y
Application.ScreenUpdating = True
Open in new window
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.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.