Slow running macro

knlyn

New Member
Joined
Dec 3, 2012
Messages
2
I have made a macro, but I think it runs too slow. I found out which part that ran slow. My findings was that the block below used 6 sec.

Does anyone have a suggestion to speed it up ?
Worksheets("Oppsummering Freia").Cells(TargetRow, 3).Value = Worksheets("Registrering").Cells(6, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 4).Value = Worksheets("Registrering").Cells(23, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 5).Value = Worksheets("Registrering").Cells(24, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 6).Value = Worksheets("Registrering").Cells(16, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 7).Value = Worksheets("Registrering").Cells(17, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 8).Value = Worksheets("Registrering").Cells(18, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 9).Value = Worksheets("Registrering").Cells(19, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 10).Value = Worksheets("Registrering").Cells(30, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 11).Value = Worksheets("Registrering").Cells(33, 3).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 12).Value = Worksheets("Registrering").Cells(22, 9).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 13).Value = Worksheets("Registrering").Cells(23, 9).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 14).Value = Worksheets("Registrering").Cells(24, 9).Value
Worksheets("Oppsummering Freia").Cells(TargetRow, 15).Value = Worksheets("Registrering").Cells(26, 9).Value


(The block moves data from one sheet to another)

Thanks for any help.

Knut
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Try

Code:
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
'
'your code here
'

Application.ScreenUpdating = True
Application.Calculation = xlAutomatic
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,847
Members
452,361
Latest member
d3ad3y3

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