FormulaArray
01.08.2005 15:01:26
Ramon
ich wuerde gerne folgenden Zeilen-Algoritmus in eine Schleife schreiben. Unten habe ich meinen Versuch dazu beigefuegt. Das Problem ist, wie ich mir habe sagen lassen, dass innerhalb des "FormulaArray" der Ausdruck "Range(Cells(1,i+1),Cells(4680,i+1))" nicht als solcher erkannt wird. Wie kann ich das ändern? Danke im Vorraus, Ramon
If Cells(4685, 4) = 0 Then Cells(4686, 5) = 0
If Cells(4686, 4) 0 Then [e4686].FormulaArray = "=MAX(IF(MOD(Row(1:4680),13)=0,E1:E4680))"
If Cells(4685, 6) = 0 Then Cells(4686, 7) = 0
If Cells(4686, 6) 0 Then [g4686].FormulaArray = "=MAX(IF(MOD(Row(1:4680),13)=0,G1:G4680))"
usw...bis...
If Cells(4685, 202) = 0 Then Cells(4686, 203) = 0
If Cells(4686, 202) 0 Then [gu4686].FormulaArray = "=MAX(IF(MOD(Row(1:4680),13)=0,GU1:GU4680))"
Eigener Versuch das in eine Schleife zu packen:
For i = 4 To 202 Step 2
If Cells(4685, i) = 0 Then Cells(4686, i + 1) = 0
If Cells(4686, i) 0 Then Cells(4686, i + 1).FormulaArray = "=MAX(IF(MOD(Row(1:4680),13)=0, Range(Cells(1,i+1),Cells(4680,i+1))"
Next i