Hi all,
I have developed a macro that auto-fills selected cells based on an inputbox. I am in need of assistance to finish it off.
What I need is an update to this code so that if a selected cell is non-blank then it will ignore the cell and move on to the next selected cell. I am not sure how to add this in. Currently the inputbox will over-right any non-blank cells with the entered initials. Can somebody please help me add this code in to this macro?
Thanks team!
I have developed a macro that auto-fills selected cells based on an inputbox. I am in need of assistance to finish it off.
Code:
Sub Initials()
Dim r As Range
Dim c As Range
Dim name As Variant
Set r = Application.InputBox("Select cell(s)", "Demo", , , , , , 8)
r.Select
name = InputBox("Enter workers Initials:")
For Each c In r.Cells
r.Cells = name
Next c
End Sub
What I need is an update to this code so that if a selected cell is non-blank then it will ignore the cell and move on to the next selected cell. I am not sure how to add this in. Currently the inputbox will over-right any non-blank cells with the entered initials. Can somebody please help me add this code in to this macro?
Thanks team!