Hi,
I have a macro that is 90% perfect for what I need but I am just struggling coding the macro ignore hidden columns. This is my code that I have so far:
I have tried adding to no avail:
Could somebody please help me finish off this macro?
Thanks,
Milos
I have a macro that is 90% perfect for what I need but I am just struggling coding the macro ignore hidden columns. This is my code that I have so far:
Code:
Sub Update_Selected_Cells_With_Inputbox()
Dim r As Range
Dim c As Range
Dim name As Variant
Set r = Selection.Cells
name = InputBox("Enter text:")
For Each c In r.Cells
If IsEmpty(c) Then
c = name
Else
End If
Next c
End Sub
I have tried adding to no avail:
Code:
ElseIf Columns.Hidden = True Then
c = ""
Else
Could somebody please help me finish off this macro?
Thanks,
Milos