Quote:
Originally Posted by ewso
What would I replace the range with in the macro for it to always use the selected range I have at the time of running the macro?
|
That really depends on what the recorded macro does and what you're trying to achieve. In come cases, you could get away with just referring to a Selection. However, once you start moving around and, for example, modifying other cells whose choice based on their logical relationship to the set you initially selected or to some other feature of a worksheet, that's soon going to prove very inadequate.
If you look about this forum, you'll see many coding examples, the better of which rarely entail selecting anything; a hallmark of recorded macros is that whatever they affect gets selected and there's often a lot of worksheet scrolling activating, etc.
If you want specific advice regarding the problem you're trying to solve, describe it to us and post the code you've recorded.