Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Folks,
I am currently working on a budgeting-sheet. I have personel data on one worksheed, expected income on another, and want to get an monthly overview out of this. Since doing this by lookups etc. was difficult or impossible, I started writing a VBA-function that does work properly and seems simple enough. When doing that, Excel started becoming slooooww because of frequent recalculations and this now takes too long. Any idea why this is the case? Here comes my function (I have two very similar ones ...). Any hints are appreciated! Peter Public Function GehaltSumme(datum, projekt) As Currency Dim i As Integer Dim Summe As Currency Application.Calculation = xlCalculationManual With Worksheets("Personal") For i = 1 To .Range("VonSpalte").Rows.Count If projekt = .Range("ProjektSpalte").Cells(i) Then If datum = .Range("VonSpalte").Cells(i) Then If (CLng(.Range("BisSpalte").Cells(i)) = 0) Or (datum <= ..Range("BisSpalte").Cells(i)) Then Summe = Summe + .Range("BruttoSpalte").Cells(i) End If End If End If Next End With GehaltSumme = Summe Application.Calculation = xlCalculationAutomatic End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Recalculation Problem After Save As. | Excel Discussion (Misc queries) | |||
Improving Recalculation Speed for Complex Links | Excel Discussion (Misc queries) | |||
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? | Excel Programming | |||
Recalculation Speed After Editing Macro Code | Excel Programming | |||
Formula recalculation speed | Excel Programming |