select data 4N DCC

need select first digit of column GJ

then  add the 2 digit of column GL

then show together in column IE

as show here

1a.PNG
here the file
4N_BRO_DCC_to.xlsm
ADRIANA PACCOUNTING ASSISTANTAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Try this...

Sub DCC()
Dim lr As Long
Dim Rng As Range, Cell As Range
Application.ScreenUpdating = False
lr = Cells(Rows.Count, "GJ").End(xlUp).Row
Set Rng = Range("GJ6:GJ" & lr)
For Each Cell In Rng
    If IsNumeric(Cell.Value) And IsNumeric(Cell.Offset(0, 2).Value) Then
        Cells(Cell.Row, "IE").NumberFormat = "@"
        Cells(Cell.Row, "IE") = Left(Cell.Value, 1) & Left(Cell.Offset(0, 2).Value, 2)
    End If
Next Cell
Application.ScreenUpdating = True
End Sub

Open in new window

4N_BRO_DCC_to.xlsm
1
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Subodh Tiwari (Neeraj)

working as needed  the only detail

is taking long time

can be improve the time ?
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Okay, try this...
Replace the existing code on Module3 with the following code.

Sub DCC()
Dim lr As Long, i As Long
Dim x, y()
Application.ScreenUpdating = False
lr = Cells(Rows.Count, "GJ").End(xlUp).Row
x = Range("GJ6:GL" & lr).Value
ReDim y(1 To UBound(x, 1), 1 To 1)
For i = 1 To UBound(x, 1)
    If IsNumeric(x(i, 1)) And IsNumeric(x(i, 3)) Then
        y(i, 1) = Left(x(i, 1), 1) & Left(x(i, 3), 2)
    End If
Next i
Range("IE6").Resize(UBound(y), 1).Value = y
Application.ScreenUpdating = True
End Sub

Open in new window

1
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Subodh Tiwari (Neeraj)

im not an computer Expert !
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You uploaded a large sample file, it's taking time to upload it back.
I am trying to upload it. :)
0
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Please find the attached.
4N_BRO_DCC_to-v2.xlsm
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
Great JoB !

Best Expert !
1
ADRIANA PACCOUNTING ASSISTANTAuthor Commented:
wao!
That's was very very very  faster
1
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Yes, that is. :)
1
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.