Liebe Helfer,
ich bedanke mich für alle Inputs.
Letztendlich hat das geholfen.
Ich werde mir wohl die Office-Verdion 2021 kaufen, denn ich habe doch teilweise recht umfangreiche VBA-Scripte erstellt und hoffe, dass das umgesetzt wird.
Beispiel gefällig?
Public Sub Auswerten()
Dim Zeile As Integer, Spalte As Integer, Wert As Integer
Dim Z As Integer, S As Integer, ZQ As Integer, SQ As Integer
Dim ZY As Integer, SY As Integer
Zeile = ActiveCell.Row
Spalte = ActiveCell.Column
If Zeile > 27 Or Spalte > 27 Then GoTo Fehler
Wert = ActiveCell
If Wert = 0 Then GoTo Fehler
Z = Zeile Mod 3
Select Case Z
Case 0
Zeile = Zeile - 1: Z = 1
Case 1
Zeile = Zeile + 1: Z = -1
Case Else
Z = 0
End Select
S = Spalte Mod 3
Select Case S
Case 0
Spalte = Spalte - 1: S = 1
Case 1
Spalte = Spalte + 1: S = -1
Case Else
S = 0
End Select
If Zeile < 9 Then
ZQ = 3: ZX = 2
ElseIf Zeile > 19 Then
ZQ = 21: ZX = 20
Else
ZQ = 12: ZX = 11
End If
If Spalte < 9 Then
SQ = 34: SX = 2
ElseIf Spalte > 19 Then
SQ = 40: SX = 20
Else
SQ = 37: SX = 11
End If
For i = Zeile - 1 To Zeile + 1
For j = Spalte - 1 To Spalte + 1
If Cells(i, j) <> "" Then
Cells(i, j) = ""
End If
Next j
Next i
If Wert = 5 Then
For i = ZX To ZX + 6 Step 3
For j = SX To SX + 6 Step 3
If Cells(i, j) = 5 Then
Cells(i, j) = ""
End If
Next j
Next i
For i = S + 2 To S + 27 Step 3
If Cells(Zeile + Z, i) = 5 Then
Cells(Zeile + Z, i) = ""
End If
Next i
For i = Z + 2 To Z + 27 Step 3
If Cells(i, Spalte + S) = 5 Then
Cells(i, Spalte + S) = ""
End If
Next i
Cells(Zeile, 28) = 1
Cells(28, Spalte) = 1
Cells(ZQ, SQ) = 1
Else
For i = ZX + Z To ZX + Z + 6 Step 3
For j = SX + S To SX + S + 6 Step 3
If Cells(i, j) <> "" Then
Cells(i, j) = ""
End If
Next j
Next i
For i = S + 2 To S + 27 Step 3
If Cells(Zeile + Z, i) <> "" Then
Cells(Zeile + Z, i) = ""
End If
Next i
For i = Z + 2 To Z + 27 Step 3
If Cells(i, Spalte + S) <> "" Then
Cells(i, Spalte + S) = ""
End If
Next i
End If
Cells(Zeile, Spalte) = Wert
Fehler:
Range("AD30").Select
End Sub
Sub Resetten()
Dim Zeile As Integer, Spalte As Integer
Blattname = ActiveSheet.Name
Sheets("Vorlage").Select
Range("A1:AB28").Select
Selection.Copy
Sheets(Blattname).Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
' ActiveSheet.Paste
Range("AD30").Select
For Zeile = 3 To 21 Step 9
For Spalte = 34 To 40 Step 3
Cells(Zeile, Spalte) = ""
Next Spalte
Next Zeile
End Sub
Das mag ich nicht überarbeiten.
Danke.