Forum Discussion
Mehdi Boulifa
Feb 16, 2018Copper Contributor
Macro excel 2013 : Failure excution
Hello,
I need some little help about Macro in Excel 2013, I made a simple macro, but I have to select the same cell in excel to do the same work, could I do the same macro on another column or another cell number ?
Any modification on vba basic to execute the same instruction, but on other cells?
- Haytham AmairahSilver Contributor
Hi Mehdi,
Please show us that macro to figure out how to modify it!
Go to the VBA editor, copy the macro code, and then paste it here in a reply!
- Mehdi BoulifaCopper Contributor
This is a simple exemple, I need to apply it anywhere in the sheet...
Sub CAP() ' ' CAP Macro ' ' ActiveCell.FormulaR1C1 = "=UPPER(RC[-1])" Range("D20").Select End Sub
- Haytham AmairahSilver Contributor
Mehdi,
Replace that code with this:
Sub CAP() Selection = "=UPPER(RC[-1])" End Sub
You can apply it not only to a single cell but also to a range of cells!