LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Controling recalculation - or how to solve my speed problem?

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recalculation Problem After Save As. Stuart Hagon Excel Discussion (Misc queries) 4 September 29th 08 11:48 AM
Improving Recalculation Speed for Complex Links Andrew Excel Discussion (Misc queries) 0 November 7th 06 09:29 AM
Problem when multipple users access shared xl-file at the same time, macrocode for solve this problem? OCI Excel Programming 0 May 16th 04 10:40 PM
Recalculation Speed After Editing Macro Code Bob Keating Excel Programming 1 November 16th 03 01:08 PM
Formula recalculation speed Steve Slack Excel Programming 3 October 1st 03 06:06 AM


All times are GMT +1. The time now is 02:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"