Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Why does this code not get updated
I have got a code which needs to be updated across 19 services for each
of the three different sites. But the code gets intrrupted as soon as it finishes when i-1 and j=1 and then we need to click to resume button to go to 1=1, j=2. Can anyone tell me what needs to be done to update it for all the three sites and the 19 services as well. Sub UPDATING() Application.ScreenUpdating = False Application.Calculation = xlCalculationManual stepsize = 100 For i = 1 To 4 For j = 1 To 19 PasteRes = "ResultsPaste" & i Range("HospitalInUSe") = i Range("ServiceInUse") = j If Range("TOTALCOSTS") 1 Then Range("TargetCell1").GoalSeek Goal:=Range("TargetValue1"), ChangingCell:=Range("ChangeCell1") Else Range("ChangeCell1") = 0 End If If Range("Reducer") = "no" And Range("ChangeCell1") < 0 Then Range("ChangeCell") = 0 Calculate Range("CalcResults").Copy Range(PasteRes).Offset(stepsize * j, 0).PasteSpecial xlPasteValues Range(PasteRes).Offset(stepsize * j, 0).PasteSpecial xlPasteFormats Next j Next i Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel cells randomly don't get updated unless each cell is updated | Excel Discussion (Misc queries) | |||
updated row comes at the top | Excel Discussion (Misc queries) | |||
Link cannot be updated | Setting up and Configuration of Excel | |||
Updated Cells | Excel Programming | |||
Updated problem | Excel Programming |