Question : Why Does This Excel Macro Give Different Results?

I have created an Excel 2007 macro, and I have attached its code.  What's puzzling me is that this macro gives different results everytime that it is used.  It is run against the same set of data, so I do not understand why it is producing different data in the spreadsheet.  Again, attached is the code.  

Also attached is a spreadsheet called "Minimum Balance with Average".  This spreadsheet  is the result of exporting data from Microsoft Dynamics GP to Excel.  It, also, contains the first third of the attached code (i.e. it also contains a macro).

You see, the attached macro code takes the spreadsheet and its macro and "adds" onto the macro with additional code to generate a spreadsheet similar to the other two attached spreadsheets.

As you can see from examining those two spreadsheets, different results are given every time the macro runs.  That's not good.  The results need to be consistent.  Is there anything in the attached code that can be modified to allow for consistency?
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
ActiveWindow.LargeScroll ToRight:=1
    ActiveWindow.SmallScroll ToRight:=-5
    Range("L2:L" & Cells(Cells.Rows.Count, "J").End(xlUp).Row).FormulaR1C1 = "=IF(RC[-2]
           

Answer : Why Does This Excel Macro Give Different Results?

disregard.....I figured it out.....it's an issue with the dataset inside of GP....

I apologize, for the bother.
Random Solutions  
 
programming4us programming4us