Recording macros in excel?

0

I recorded a macro converting number formatting with a pivot chart about 100 cells and tried running that macro on another pivot chart with much more cells but only a few converting. Does the macro only affect the number of cells with which it was first recorded with?

I recorded the first macro1 but I would like it to fit to range of macro 2 so that I don't have 2 macros doing the same thing just because there are more cells in one pivot chart.

Code of both Macros

Piper Ramirez

Posted 2018-07-12T13:37:17.180

Reputation: 1

1Open the vbe and you can see the code. It is a literal copy of ever action so, most likely it will only format the same cells as you recorded. If you want help on changing the code to fit your needs. edit the question with the code that was recorded and specifically explain what it is doing and what you need it to do. – Scott Craner – 2018-07-12T13:42:31.673

please put the code as text, we cannot copy paste a photo. – Scott Craner – 2018-07-12T13:49:03.963

@ScottCraner I've edited the question if you'd like to take a shot at it. Would like to hear your feedback. – Piper Ramirez – 2018-07-12T13:49:30.403

the easiest way would be to remove the first line in each of the macros, then select all the cells yourself that you want to format. with those cells selected run the macro. – Scott Craner – 2018-07-12T13:54:52.303

@ScottCraner Remove the "ActiveCell" line or "Sub Macro" Line? – Piper Ramirez – 2018-07-12T14:00:17.220

activeCell line – Scott Craner – 2018-07-12T14:00:48.483

No answers