View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default More efficient way?

I don't know if this is what you want but this will copy row 2 formulas in
each sheet down to the last cell in col B of each worksheet.

Sub fc()
Set shtarray = Sheets(Array("LMU", "Kit", "SMLC"))
For Each sh In shtarray
With sh
x = .Cells(Rows.Count, "B").End(xlUp).Row
..Rows(2).Copy .Rows("2:" & x)
End With
Next
End Sub

--
Don Guillett
SalesAid Software

"Steph" wrote in message
...
Hi everyone. Was hoping someone had some ideas on how to speed up the
following code. The base code was started using the macro-recorder. I
selected several sheets using the ctl key,
then copied row 2 with formulas in it (each sheet has a row of formulas in
the same row), then pasted it to a range. It works....just slowly. I'm
running a 2.4G processor with 2.0G of memory...and it still takes forever!
Granted, each sheet is being populated with 13,000 cells, but I still

didn't
think it would take this long. Have a better method?? Thanks!


Sub Forecast()

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

Set shtarray = Sheets(Array("LMU", "Kit", "SMLC", "WLG", "SMLC Cab", "Serv
Cab", "Ntwk Kit", _
"TDAX", "EMS", "SCOUT", "Dir Coup"))

shtarray.Select
Sheets("LMU").Activate

Range("A2:EC2").Copy

Set frng = Range("A5:EC" & Data.Range("b65536").End(xlUp).Row)
frng.PasteSpecial Paste:=xlPasteFormulas

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True