Ich habe mir folgendes Makro gebaut:
Sub Datenuebernehmen()
Set ueberzahl = ActiveCell
If Cells(ActiveCell.Row, ActiveCell.Column + 1) Then
Cells(ActiveCell.Row, ActiveCell.Column + 1).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 2).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 3).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 4).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 5).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 6).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 7).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 8).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 9).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 10).FormulaR1C1 = ueberzahl
Cells(ActiveCell.Row, ActiveCell.Column + 11).FormulaR1C1 = ueberzahl
Else
'weitere Vorgehensweise abfragen
Frage_ausfuellen.Show
End If
End Sub
Wie bekomme ich es hin, das die Werte nur ausgefüllt werden, wenn die Summe der 11 nebeneinanderliegenden Zellen 0 ist?
Ich habe es mit:
If Cells(ActiveCell.Row, ActiveCell.Column + 1) + Cells(ActiveCell.Row, ActiveCell.Column + 2) = 0....
leider geht das nicht
Vielleicht habt Ihr ne Idee
Danke schonmal
Steffen