Gruppe
Allgemein
Problem
In einem auszuwählenden Bereich sollen die Leerzellen mit Dummy-Werten gefüllt werden.
StandardModule: Modul1
Sub Emptys2Dummys()
Dim rng As Range, rngEmptys As Range
Dim vRng As Variant, vDummy As Variant
On Error GoTo ERRORHANDLER
Set vRng = Application.InputBox( _
prompt:="Bitte Bereich auswählen:", _
Title:="Bereichsauswahl", _
Type:=8)
If vRng Is Nothing Then Exit Sub
vDummy = Application.InputBox( _
prompt:="Bitte Dummy-Text eingeben:", _
Title:="Dummy-Text", _
Type:=2)
If vDummy = False Then GoTo ERRORHANDLER
Set rngEmptys = vRng.SpecialCells(xlCellTypeBlanks)
rngEmptys.Value = vDummy
ERRORHANDLER:
End Sub