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 anot...
Haytham Amairah
Feb 16, 2018Silver 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 BoulifaFeb 16, 2018Copper 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 AmairahFeb 16, 2018Silver 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!
- Mehdi BoulifaFeb 16, 2018Copper Contributor
What about any other macro, I will always use the same cells number !
if I would like to apply the same macro in a different place in the sheet !
it was an example that I sent to you, I want a general method.