Macro Calculations - Display Data at the End

ststern45

Well-known Member
Joined
Sep 17, 2005
Messages
974
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
I have a question about Excel 365 and how macros calculate VBA code.
I have a macro that has 2 routines that are tied together.
Routine 1 is a loop from 1 to 26
Routine 2 calculates and places the results in a range of data.
My question is all the calculations for 1 through 26 appear when the macro ends.
The older versions of Excel such as Excel 2010 would display the results from each loop value.
Thank you in advance.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
It could possibly help if you showed the code(s) in question.
 
Upvote 0
VBA Code:
Sub Step2P1A()

Dim aRng As String
Dim cll As Variant


aRng = Sheets("Position1Calc").Range("F1").Value

With ActiveSheet
For Each cll In .Range(aRng & Range("F10").Value & ":" & aRng & Range("F11").Value).Cells

.Range("F12").Value = cll.Value
         
              
        Step2P1B
        
          
    Next cll
    End With
   
Application.ScreenUpdating = True
   
End Sub




Sub Step2P1B()


    Dim aRng As String
    Dim bRng As String
   
   
    Application.ScreenUpdating = False
   
    Sheets("Position1Calc").Select

   
   
    aRng = Sheets("Position1Calc").Range("I8").Value
    bRng = Sheets("Position1Calc").Range("J8").Value
   
     
   
    'Copy New Position 1 Value To DrawHistory Worksheet
    Range(aRng & Range("K8").Value).Select
    Application.CutCopyMode = False
    Selection.Copy

    Sheets("DrawHistory").Select
    Range(bRng & Range("B17").Value).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
       
    Application.CutCopyMode = False

    Sheets("Position1Calc").Select
    Range("J2").Select

    'Copy Position 1 Data

    Sheets("Calculations").Select
   
    Range("GK9:VI9").Select
    Application.CutCopyMode = False
    Selection.Copy


    Sheets("Position1Calc").Select
    Range("AB" & Range("I12").Value).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
       
    Range("J2").Select
       
    Application.CutCopyMode = False
           
      
   


End Sub
 
Last edited by a moderator:
Upvote 0
Use Code Tags MrExcel.JPG
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,141
Members
453,021
Latest member
Justyna P

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