Sub Insert_formula()
Dim MyArrFor As Variant
Dim MyArrRng As Variant
Dim ZeilenIndex As Integer
Dim ArrIndex As Integer
MyArrFor = Array("= Tabelle2!C3", "=Tabelle2!E3")
MyArrRng = Array("B", "C")
For ZeilenIndex = 4 To 200
For ArrIndex = LBound(MyArrRng, 1) To UBound(MyArrRng, 1)
If IsNumeric(Range("" & MyArrRng(ArrIndex) & ZeilenIndex)) = True Then
Range("" & MyArrRng(ArrIndex) & ZeilenIndex).Formula = MyArrFor(ArrIndex)
End If
Next ArrIndex
Next ZeilenIndex
End Sub Sub FillFormulas()
Dim lngCount As Integer
Dim lngCount2 As Integer
For lngCount = 4 To 200
Range("B" & lngCount).FormulaR1C1 = "=Tabelle2!R[" & 3 - lngCount & "]C[" _
& (lngCount - 3) + lngCount2 * 8 & "]"
Range("C" & lngCount).FormulaR1C1 = "=Tabelle2!R[" & 3 - lngCount & "]C[" _
& (lngCount - 2) + lngCount2 * 8 & "]"
Range("D" & lngCount).FormulaR1C1 = "=Tabelle2!R[" & 3 - lngCount & "]C[" _
& (lngCount + 1) + lngCount2 * 8 & "]"
Range("E" & lngCount).FormulaR1C1 = "=(Tabelle1!R[" & 1002 - lngCount & "]C[" _
& (lngCount - 7) + lngCount2 * 8 & "])" _
& "-(Tabelle1!R[" & 1002 - lngCount & "]C[" _
& (lngCount - 5) + lngCount2 * 8 & "])"
Range("F" & lngCount).FormulaR1C1 = "=Tabelle2!R[" & 1002 - lngCount & "]C[" _
& (lngCount - 7) + lngCount2 * 8 & "]"
lngCount2 = lngCount2 + 1
Next lngCount
End Sub
Makro mit formeln überlastet?
Nicole2 27.11.2008 - 32 Hits - 18 Antworten
Bedingung beim Ausfüllen in Excel
Anlernling 12.02.2009 - 631 Hits - 5 Antworten
Makro Excel -> Formeln in Abgängigkeit von bestimmter Zelle kopieren/anwenden
Der_Max 06.07.2009 - 307 Hits - 6 Antworten
Makro in Excel zum Formeln übertragen
nickdeluxe 07.09.2009 - 358 Hits - 14 Antworten
Formel automatisch ausfüllen
Andreadis 01.05.2010 - 122 Hits - 3 Antworten