Please explain exactly what you mean.Hi peter.
Tnx again, but I have 1 more question/
Is there a way to run this code from left to right ?
Tnx
eran
Book1 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | xxx | 1/02/2017 | 1/03/2017 | 1/04/2017 | 1/05/2017 | 1/06/2017 | 1/07/2017 | 1/08/2017 | 1/09/2017 | ||
2 | A | X | X | ||||||||
3 | B | X | |||||||||
4 | C | Y | Y | ||||||||
5 | D | X | X | ||||||||
6 | E | X | |||||||||
7 | F | Y | Y | ||||||||
8 | G | Y | X | ||||||||
9 | H | X | |||||||||
Fill blanks |
Sub FillBlanksRight()
Application.ScreenUpdating = False
With ActiveSheet.UsedRange.Offset(1, 1)
.SpecialCells(xlBlanks).FormulaR1C1 = "=IF(COUNTA(RC1:RC[-1])>1,RC[-1],"""")"
.Value = .Value
End With
Application.ScreenUpdating = True
End Sub
Book1 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | |||
1 | xxx | 1/02/2017 | 1/03/2017 | 1/04/2017 | 1/05/2017 | 1/06/2017 | 1/07/2017 | 1/08/2017 | 1/09/2017 | ||
2 | A | X | X | X | |||||||
3 | B | X | X | X | |||||||
4 | C | Y | Y | Y | |||||||
5 | D | X | X | X | |||||||
6 | E | X | X | X | |||||||
7 | F | Y | Y | Y | |||||||
8 | G | Y | Y | X | X | ||||||
9 | H | X | X | ||||||||
Fill blanks |