sakrams
Board Regular
- Joined
- Sep 28, 2009
- Messages
- 59
- Office Version
- 2016
- Platform
- Windows
Good Afternoon Excel Gurus,
Need your help with a macro please. I have managed to achieve partially what I need, but what I am after is to repeat the same steps for a range selected in a row. A better option would be to give a popup to fill the adjacent cells (60 or 100 cells) or a range manually selected whichever is easy.
Starting point should be the whatever the active cell is. I can copy paste this multiple times in the macro, but looking for a cleaner code.
Please help.
---------------------------------
Sub DDDDXXX()
Selection.Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "X"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "X"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "X"
End Sub
-------------------
Thanks
Need your help with a macro please. I have managed to achieve partially what I need, but what I am after is to repeat the same steps for a range selected in a row. A better option would be to give a popup to fill the adjacent cells (60 or 100 cells) or a range manually selected whichever is easy.
Starting point should be the whatever the active cell is. I can copy paste this multiple times in the macro, but looking for a cleaner code.
Please help.
---------------------------------
Sub DDDDXXX()
Selection.Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "D"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "X"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "X"
ActiveCell.Offset(0, 1).Select
ActiveCell.FormulaR1C1 = "X"
End Sub
-------------------
Thanks