Excel VBA Running Macros on Foreach Loop without Switching Sheets
<p>I have a module on VBA which basically runs a foreach loop for every cell that contains text in a column. The contents of each cell are then copied to another sheet where another function is called upon (DailyGet). The contents generated from the function are the copied back into the original sheet (i generated the code for this by recordings a macros). However, since there are many cells to process in the foreach loop, it is quite time consuming because the macros switches between sheets each time to run. Is there any way to speed up the process?</p>

<pre><code>Sub DailyComposite()

Dim SrchRng As Range, cel As Range
Set SrchRng = Range("B2:B100")

For Each cel In SrchRng

    If cel.Value &lt;&gt; "" Then

        Worksheets("Calculations").Range("B1").Value = cel.Value
        Sheets("Calculations").Select
            Call DailyGet
            Range("D3:Z3").Select
            Application.CutCopyMode = False
            Selection.copy
            Sheets("Summary").Select
            cel.Offset(0, 1).Select
        Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
            xlNone, SkipBlanks:=False, Transpose:=False

    End If

Next cel

    Sheets("Calculations").Select
    Application.CutCopyMode = False
    Range("A1").Select
    Sheets("Summary").Select
    Range("A1").Select

End Sub
</code></pre>