ich möchte Bereichsnamen immer bezogen auf eine Zelle erstellen.
Es wird zwar der Bereichsnamen angelegt
Name Wert bezieht sich auf Bereich
Meier_Abw = ="=" "Personal"
Danke!
Gru?
Sigi
Sub BereichsNamenAnl()
Dim sName As String
Dim sZiel As String
Dim ii As Long, x As Long, y As Long
With Application
.Calculation = xlCalculationManual
.EnableEvents = False
.DisplayAlerts = False
.ScreenUpdating = False
End With
With ActiveSheet
For ii = 12 To 36 Step 12
For x = 5 To 36 Step 12
' y = y + 11
sZiel = .cells(7,y)
sName = .Name & "!" & Cells(1, x) & "_" & Cells(1, x + 5)
ActiveWorkbook.Names.Add Name:=sName, RefersTo:="=" & sZiel
Next x
Next ii
End With
With Application
.Calculation = xlCalculationAutomatic
.EnableEvents = True
.DisplayAlerts = True
.ScreenUpdating = True
End With
End Sub
https://www.herber.de/bbs/user/114029.xlsm