Make me faster!!!!!

pooley100777

New Member
Joined
Mar 27, 2013
Messages
21
Can anyone help with the following, i did post earlier but it was on another subject.

I have the following code:

Sheets("MCA CODES").Select
Range("D1").Select
Do
ActiveCell.FormulaR1C1 = "=MID(RC[-1],5,3)"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "=MID(RC[-2],8,2)"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "=MID(RC[-3],10,2)"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "=MID(RC[-4],12,4)"
ActiveCell.Offset(1, -3).Select
Loop Until ActiveCell.Offset(0, -1) = ""
End Sub


Now the problem i have is that the spreadsheet has over 5000 lines and for each for line it has to pull from one cell 4 sets of data.

Example AAAASLSGNOTA1234 so in column D i would have SLS "E" GN "F" OT "G" A1234

I have done the formula above but it takes a good 20 minutes to run and i have already tried turning the screenupdating off but it hardly makes a difference... am i missing something simple or is there anyway of a workaround?
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Do really need the formula to end up in the cell, or just the resulting value?

This will give just the resulting values without the formula.

Code:
Sub Macro1()
With Sheets("MCA CODES")
    .Columns("D:D").TextToColumns Destination:=.Range("E1"), DataType:=xlFixedWidth, _
        FieldInfo:=Array(Array(0, 9), Array(4, 1), Array(7, 1), Array(9, 1), Array(11, 1), Array(16, 9))
End With
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,268
Messages
6,123,970
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top