GetInputOrSelection non-contiguous
Opened this issue · 2 comments
We should probably find all the implementations of GetInputOrSelection
to determine what will fail when non-contiguous ranges are selected.
Ref: #56
Actually, are non-contiguous ranges acceptable as input anywhere?
I've been a little fast and loose with identifying where non-contiguous ranges are allowed. In general, I'd like for them to be supported by default, with the exceptions being those spots where it doesn't make sense. It's easy enough to iterate through For Each rngCell in Selection
and support non-contiguous ranges.
Where things start to break is when there are side effects (e.g. the split into columns feature) where the code causes things to happen outside of the cell. In these cases, it may be just as easy to support non-contiguous ranges (just use Offset
to find the cell to edit) but things will go awry if someone selects cells in neighboring columns.
Other places that will break are those that are feeding the selection to some internal Excel thing that does not enjoy non-contiguous ranges. I suspect most of the charting stuff will behave oddly if fed non-contiguous ranges.
Part of the problem here is that most of the code was purpose built for things that I am doing regularly and then made general. The code by its nature supports all of the use cases I have in mind so I don't run up against edge cases where people use the code in unintended ways.
I'll find those references to GetInput
to get things started.