This is the type of code that is generated from the macro recorder. However, a programmer knows more than the macro recorder. It is not necessary to Select a range that you want to get the value of or assign a value to. When you select a cell, the macro recorder has no idea what you plan to do next, so it records the selection. Then if you change the value, it operates on the selection. But you can collapse this down into one step in your code, as I did:
When using the macro recorder, there is a large amount of excessive code generated, including explicitly setting defaults for things like fonts. Here is another example:
This simply sets the font style and size, which is what I assume you were trying to.
Bookmarks