Anybody ?
Sub FillBlanksLeft()
Application.ScreenUpdating = False
With ActiveSheet.UsedRange
.SpecialCells(xlBlanks).FormulaR1C1 = "=IF(COUNTA(RC[1]:RC[" & .Columns.Count & "]),RC[1],"""")"
.Value = .Value
End With
Application.ScreenUpdating = True
End Sub
Book1 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Y | X | ||||||
2 | Y | X | ||||||
Fill blanks |
Book1 | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | Y | Y | Y | X | X | |||
2 | Y | X | X | |||||
Fill blanks |