tezza
Active Member
- Joined
- Sep 10, 2006
- Messages
- 375
- Office Version
- 2016
- 2010
- Platform
- Windows
- Web
Hi
I get a runtime error 6 overflow when I run the macro on a large spreadsheet of 44000 lines but it works fine on something like 15000 lines.
What can I do to allow it to run successfully.
The code stops at
I get a runtime error 6 overflow when I run the macro on a large spreadsheet of 44000 lines but it works fine on something like 15000 lines.
What can I do to allow it to run successfully.
The code stops at
Excel Formula:
For n = 2 To No_rows
VBA Code:
Set s1 = Worksheets("Sheet1")
No_rows = s1.Cells(Rows.Count, 2).End(xlUp).Row
n = 2
For n = 2 To No_rows
Basic = Basic_Pay(s1.Cells(n, 19), s1.Cells(n, 9), s1.Cells(n, 10), s1.Cells(n, 12), s1.Cells(n, 13))
s1.Cells(n, 20) = Basic
Dom = Dom_care(s1.Cells(n, 19), s1.Cells(n, 9), s1.Cells(n, 10), s1.Cells(n, 12), s1.Cells(n, 13))
s1.Cells(n, 21) = Dom
Special_Task = Sp_Task(s1.Cells(n, 19), s1.Cells(n, 9), s1.Cells(n, 10), s1.Cells(n, 12), s1.Cells(n, 13))
s1.Cells(n, 22) = Special_Task
Weekends = Weekend(s1.Cells(n, 19), s1.Cells(n, 9), s1.Cells(n, 10), s1.Cells(n, 12), s1.Cells(n, 13))
s1.Cells(n, 23) = Weekends
Offices = Office(s1.Cells(n, 19), s1.Cells(n, 9), s1.Cells(n, 10), s1.Cells(n, 12), s1.Cells(n, 13))
s1.Cells(n, 24) = Offices
Next n