[RESOLVED] Looking to make this macro Faster
Code:
Sub STEP16()
Dim wb1 As Workbook
Dim ws1 As Worksheet
Set wb1 = Workbooks.Open("C:\Users\WolfieeeStyle\Desktop\HotStocks\1.xls")
Set ws1 = wb1.Worksheets.Item(1)
With ws1
Range("O2").Select
ActiveCell.FormulaR1C1 = "100"
Range("O2").Select
Selection.Copy
Range("K2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlMultiply, _
SkipBlanks:=False, Transpose:=False
End With
wb1.Save
wb1.Close
End Sub
Re: Looking to make this macro Faster
Not sure i understood what you're trying to do
Aircode:
Code:
......
Dim i As Long
With WS1
Range("O2")=100
For i=2 To UsedRange.Rows.Count
Range("K" & i)=Range("K" & i)*Range("O2")
Next
End With
Re: Looking to make this macro Faster
depending how many rows are involved, i am sure it would be faster to to read the values into an array, do the calculation, then write the array back to the range
or probably even faster, use an array formula
Re: Looking to make this macro Faster
Thnx Alot Both of u For ur Great Tips