always_confused
Board Regular
- Joined
- Feb 19, 2021
- Messages
- 68
- Office Version
- 2016
- Platform
- Windows
Hello. I am making a macro that fills in par of a range. However, the size of the total filled range is variable. I would like to start by clearing a large range before filling a smaller section. However, on the first iteration, the range is totally empty, and I get an error. Is it possible to use Range.Clear on an empty range or do I need to figure out some other way of making sure it's empty? This needs to happen at the beginning of one iteration, not the end of the previous one.
Lets say the larger range is Range("A:A") and I want to use Range("A1:A30"), then the next time Range("A1:A20"). I would like to just start my macro with Range("A:A").Clear, so that regardless of the used rows, they're all gone when I run the macro.
Lets say the larger range is Range("A:A") and I want to use Range("A1:A30"), then the next time Range("A1:A20"). I would like to just start my macro with Range("A:A").Clear, so that regardless of the used rows, they're all gone when I run the macro.