View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bimal[_3_] Bimal[_3_] is offline
external usenet poster
 
Posts: 6
Default How to reduce selection

I have seen many posts that says not to use "SELECT" and is almost
un-necessary. Following code is mainly based on the selection only.

Sheets("LIST").Range("A:C").Copy Destination:=SHT1.Range("A1")
Set ITRN = Sheets("In").Range("J:J")
Set QTRN = Sheets("In").Range("M:M")
Range("D2").Select
Do While Not IsEmpty(ActiveCell.Offset(0, -3).Value)
ActiveCell.Value = Application.WorksheetFunction.SumIf(ITRN,
ActiveCell.Offset(0, -3), QTRN)
ActiveCell.Offset(1, 0).Select
Loop
Set ITRN = Nothing
Set QTRN = Nothing

This code is being repeated 8 times for looping around 4000++ rows
to complete the report generation.

Question:
How can I reduce the "SELECT" part to speed up the macro running?

Any help is appreciated.
Bimal.