Thema Datum  Von Nutzer Rating
Antwort
16.11.2016 10:19:36 Daniel
NotSolved
18.11.2016 14:30:13 BigBen
NotSolved
Rot GOAL SEEK Problem
21.11.2016 11:10:34 Daniel
NotSolved
19.11.2016 20:51:54 Gast14351
NotSolved
19.11.2016 20:56:07 Gast14351
NotSolved
19.11.2016 21:18:37 Gast27766
NotSolved
27.11.2016 22:47:28 Daniel
NotSolved
28.11.2016 06:17:06 Gast12161
NotSolved
28.11.2016 08:59:03 Gast71991
NotSolved
06.12.2016 04:14:53 Daniel
NotSolved

Ansicht des Beitrags:
Von:
Daniel
Datum:
21.11.2016 11:10:34
Views:
971
Rating: Antwort:
  Ja
Thema:
GOAL SEEK Problem

Hallo Ihr Guten,

ich habe jetzt zwei Antworten bekommen. Danke erstmal vielmals dafür. Ich habe daraus folgendes gemacht:

rivate Sub Worksheet_Change(ByVal Target As Range)
Dim Keycells As Range

Set Keycells = Range("Ev1.1") '1. S-Iteration im 1. Segment
Range("E1.0").GoalSeek Goal:=0, changingcell:=Range("Strecke1.1")
Set Keycells = Range("E1.1") '2. S-Iteration im 1. Segment
Range("E1.Eins").GoalSeek Goal:=0, changingcell:=Range("iterierts2")

Set Keycells = Range("Ev2.1") '1. S-Iteration im 2. Segment
Range("E2.0").GoalSeek Goal:=0, changingcell:=Range("s2.1")
Set Keycells = Range("Ev2.2") '2. S-Iteration im 2. Segment
Range("E2.1").GoalSeek Goal:=0, changingcell:=Range("s2.2")

Set Keycells = Range("Ev3.1") '1. S-Iteration im 3. Segment
Range("E3.0").GoalSeek Goal:=0, changingcell:=Range("s3.1")
Set Keycells = Range("Ev3.2") '2. S-Iteration im 3. Segment
Range("E3.1").GoalSeek Goal:=0, changingcell:=Range("s3.2")

Set Keycells = Range("Ev4.1") '1. S-Iteration im 4. Segment
Range("E4.0").GoalSeek Goal:=0, changingcell:=Range("s4.1")
Set Keycells = Range("Ev4.2") '2. S-Iteration im 4. Segment
Range("E4.1").GoalSeek Goal:=0, changingcell:=Range("s4.2")

Set Keycells = Range("Ev5.1") '1. S-Iteration im 5. Segment
Range("E5.0").GoalSeek Goal:=0, changingcell:=Range("s5.1")
Set Keycells = Range("Ev5.2") '2. S-Iteration im 5. Segment
Range("E5.1").GoalSeek Goal:=0, changingcell:=Range("s5.2")

Set Keycells = Range("Ev6.1") '1. S-Iteration im 6. Segment
Range("E6.0").GoalSeek Goal:=0, changingcell:=Range("s6.1")
Set Keycells = Range("Ev6.2") '2. S-Iteration im 6. Segment
Range("E6.1").GoalSeek Goal:=0, changingcell:=Range("s6.2")

Set Keycells = Range("Ev7.1") '1. S-Iteration im 7. Segment
Range("E7.0").GoalSeek Goal:=0, changingcell:=Range("s7.1")
Set Keycells = Range("Ev7.2") '2. S-Iteration im 7. Segment
Range("E7.1").GoalSeek Goal:=0, changingcell:=Range("s7.2")

Set Keycells = Range("Ev8.1") '1. S-Iteration im 8. Segment
Range("E8.0").GoalSeek Goal:=0, changingcell:=Range("s8.1")
Set Keycells = Range("Ev8.2") '2. S-Iteration im 8. Segment
Range("E8.1").GoalSeek Goal:=0, changingcell:=Range("s8.2")

Set Keycells = Range("Ev9.1") '1. S-Iteration im 9. Segment
Range("E9.0").GoalSeek Goal:=0, changingcell:=Range("s9.1")
Set Keycells = Range("Ev9.2") '2. S-Iteration im 9. Segment
Range("E9.1").GoalSeek Goal:=0, changingcell:=Range("s9.2")

Set Keycells = Range("Ev10.1") '1. S-Iteration im 10. Segment
Range("E10.0").GoalSeek Goal:=0, changingcell:=Range("s10.1")
Set Keycells = Range("Ev10.2") '2. S-Iteration im 10. Segment
Range("E10.1").GoalSeek Goal:=0, changingcell:=Range("s10.2")

Set Keycells = Range("Ev11.1") '1. S-Iteration im 11. Segment
Range("E11.0").GoalSeek Goal:=0, changingcell:=Range("s11.1")
Set Keycells = Range("Ev11.2") '2. S-Iteration im 11. Segment
Range("E11.1").GoalSeek Goal:=0, changingcell:=Range("s11.2")

Set Keycells = Range("Ev12.1") '1. S-Iteration im 12. Segment
Range("E12.0").GoalSeek Goal:=0, changingcell:=Range("s12.1")
Set Keycells = Range("Ev12.2") '2. S-Iteration im 12. Segment
Range("E12.1").GoalSeek Goal:=0, changingcell:=Range("s12.2")

Set Keycells = Range("Ev13.1") '1. S-Iteration im 13. Segment
Range("E13.0").GoalSeek Goal:=0, changingcell:=Range("s13.1")
Set Keycells = Range("Ev13.2") '2. S-Iteration im 13. Segment
Range("E13.1").GoalSeek Goal:=0, changingcell:=Range("s13.2")

Set Keycells = Range("Ev14.1") '1. S-Iteration im 14. Segment
Range("E14.0").GoalSeek Goal:=0, changingcell:=Range("s14.1")
Set Keycells = Range("Ev14.2") '2. S-Iteration im 14. Segment
Range("E14.1").GoalSeek Goal:=0, changingcell:=Range("s14.2")

Set Keycells = Range("Ev15.1") '1. S-Iteration im 15. Segment
Range("E15.0").GoalSeek Goal:=0, changingcell:=Range("s15.1")
Set Keycells = Range("Ev15.2") '2. S-Iteration im 15. Segment
Range("E15.1").GoalSeek Goal:=0, changingcell:=Range("s15.2")

Set Keycells = Range("Ev16.1") '1. S-Iteration im 16. Segment
Range("E16.0").GoalSeek Goal:=0, changingcell:=Range("s16.1")
Set Keycells = Range("Ev16.2") '2. S-Iteration im 16. Segment
Range("E16.1").GoalSeek Goal:=0, changingcell:=Range("s16.2")

Set Keycells = Range("Ev17.1") '1. S-Iteration im 17. Segment
Range("E17.0").GoalSeek Goal:=0, changingcell:=Range("s17.1")
Set Keycells = Range("Ev17.2") '2. S-Iteration im 17. Segment
Range("E17.1").GoalSeek Goal:=0, changingcell:=Range("s17.2")

Set Keycells = Range("Ev18.1") '1. S-Iteration im 18. Segment
Range("E18.0").GoalSeek Goal:=0, changingcell:=Range("s18.1")
Set Keycells = Range("Ev18.2") '2. S-Iteration im 18. Segment
Range("E18.1").GoalSeek Goal:=0, changingcell:=Range("s18.2")

Set Keycells = Range("Ev19.1") '1. S-Iteration im 19. Segment
Range("E19.0").GoalSeek Goal:=0, changingcell:=Range("s19.1")
Set Keycells = Range("Ev19.2") '2. S-Iteration im 19. Segment
Range("E19.1").GoalSeek Goal:=0, changingcell:=Range("s19.2")

Set Keycells = Range("Ev20.1") '1. S-Iteration im 20. Segment
Range("E20.0").GoalSeek Goal:=0, changingcell:=Range("s20.1")
Set Keycells = Range("Ev20.2") '2. S-Iteration im 20. Segment
Range("E20.1").GoalSeek Goal:=0, changingcell:=Range("s20.2")

Set Keycells = Range("Ev21.1") '1. S-Iteration im 21. Segment
Range("E21.0").GoalSeek Goal:=0, changingcell:=Range("s21.1")
Set Keycells = Range("Ev21.2") '2. S-Iteration im 21. Segment
Range("E21.1").GoalSeek Goal:=0, changingcell:=Range("s21.2")

Set Keycells = Range("Ev22.1") '1. S-Iteration im 22. Segment
Range("E22.0").GoalSeek Goal:=0, changingcell:=Range("s22.1")
Set Keycells = Range("Ev22.2") '2. S-Iteration im 22. Segment
Range("E22.1").GoalSeek Goal:=0, changingcell:=Range("s22.2")

Set Keycells = Range("Ev23.1") '1. S-Iteration im 23. Segment
Range("E23.0").GoalSeek Goal:=0, changingcell:=Range("s23.1")
Set Keycells = Range("Ev23.2") '2. S-Iteration im 23. Segment
Range("E23.1").GoalSeek Goal:=0, changingcell:=Range("s23.2")

Set Keycells = Range("Ev24.1") '1. S-Iteration im 24. Segment
Range("E24.0").GoalSeek Goal:=0, changingcell:=Range("s24.1")
Set Keycells = Range("Ev24.2") '2. S-Iteration im 24. Segment
Range("E24.1").GoalSeek Goal:=0, changingcell:=Range("s24.2")

Set Keycells = Range("Ev25.1") '1. S-Iteration im 25. Segment
Range("E25.0").GoalSeek Goal:=0, changingcell:=Range("s25.1")
Set Keycells = Range("Ev25.2") '2. S-Iteration im 25. Segment
Range("E25.1").GoalSeek Goal:=0, changingcell:=Range("s25.2")

Set Keycells = Range("Ev26.1") '1. S-Iteration im 26. Segment
Range("E26.0").GoalSeek Goal:=0, changingcell:=Range("s26.1")
Set Keycells = Range("Ev26.2") '2. S-Iteration im 26. Segment
Range("E26.1").GoalSeek Goal:=0, changingcell:=Range("s26.2")

Set Keycells = Range("Ev27.1") '1. S-Iteration im 27. Segment
Range("E27.0").GoalSeek Goal:=0, changingcell:=Range("s27.1")
Set Keycells = Range("Ev27.2") '2. S-Iteration im 27. Segment
Range("E27.1").GoalSeek Goal:=0, changingcell:=Range("s27.2")

Set Keycells = Range("Ev28.1") '1. S-Iteration im 28. Segment
Range("E28.0").GoalSeek Goal:=0, changingcell:=Range("s28.1")
Set Keycells = Range("Ev28.2") '2. S-Iteration im 28. Segment
Range("E28.1").GoalSeek Goal:=0, changingcell:=Range("s28.2")

Set Keycells = Range("Ev29.1") '1. S-Iteration im 29. Segment
Range("E29.0").GoalSeek Goal:=0, changingcell:=Range("s29.1")
Set Keycells = Range("Ev29.2") '2. S-Iteration im 29. Segment
Range("E29.1").GoalSeek Goal:=0, changingcell:=Range("s29.2")

Set Keycells = Range("Ev30.1") '1. S-Iteration im 30. Segment
Range("E30.0").GoalSeek Goal:=0, changingcell:=Range("s30.1")
Set Keycells = Range("Ev30.2") '2. S-Iteration im 30. Segment
Range("E30.1").GoalSeek Goal:=0, changingcell:=Range("s30.2")

Set Keycells = Range("Ev31.1") '1. S-Iteration im 31. Segment
Range("E31.0").GoalSeek Goal:=0, changingcell:=Range("s31.1")
Set Keycells = Range("Ev31.2") '2. S-Iteration im 31. Segment
Range("E31.1").GoalSeek Goal:=0, changingcell:=Range("s31.2")

Set Keycells = Range("Ev32.1") '1. S-Iteration im 32. Segment
Range("E32.0").GoalSeek Goal:=0, changingcell:=Range("s32.1")
Set Keycells = Range("Ev32.2") '2. S-Iteration im 32. Segment
Range("E32.1").GoalSeek Goal:=0, changingcell:=Range("s32.2")

Set Keycells = Range("Ev33.1") '1. S-Iteration im 33. Segment
Range("E33.0").GoalSeek Goal:=0, changingcell:=Range("s33.1")
Set Keycells = Range("Ev33.2") '2. S-Iteration im 33. Segment
Range("E33.1").GoalSeek Goal:=0, changingcell:=Range("s33.2")

Set Keycells = Range("Ev34.1") '1. S-Iteration im 34. Segment
Range("E34.0").GoalSeek Goal:=0, changingcell:=Range("s34.1")
Set Keycells = Range("Ev34.2") '2. S-Iteration im 34. Segment
Range("E34.1").GoalSeek Goal:=0, changingcell:=Range("s34.2")
End Sub

 

Die Subroutine funktioniert auch tadellos. Es ist die halbe Strecke die ich berechnen möchte. Jetzt

zeigt sich aber, das Excel praktisch nicht mehr zu benutzen ist, weil es ständig Berechnung anstellt.

Ich habe Excel auf Manuell umgestellt. Aber das hilft auch nicht. Daher die Frage, kann man diese Routine effizienter gestalten?

Es muss zB nicht sein, dass Excel mir die zu iterierenden Zwischenwerte auf 15 Stellen nach dem Komma berechnet. Mir würden 4 Stellen vollkomen ausreichen. Oder könnte man, wenn man an der Segmentkette arbeite nicht bewirken, dass alle oberhalb gelegenen Segmente nicht berechnet würden, weil die sich ja sowieso nicht geändert haben?


Ihre Antwort
  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen
Thema: Name: Email:



  • Bitte beschreiben Sie Ihr Problem möglichst ausführlich. (Wichtige Info z.B.: Office Version, Betriebssystem, Wo genau kommen Sie nicht weiter)
  • Bitte helfen Sie ebenfalls wenn Ihnen geholfen werden konnte und markieren Sie Ihre Anfrage als erledigt (Klick auf Häckchen)
  • Bei Crossposting, entsprechende Links auf andere Forenbeiträge beifügen / nachtragen
  • Codeschnipsel am besten über den Code-Button im Text-Editor einfügen
  • Die Angabe der Emailadresse ist freiwillig und wird nur verwendet, um Sie bei Antworten auf Ihren Beitrag zu benachrichtigen