Hi all,

Thanks for taking the time to read this.

My macro brain is falling a bit short on this one and would appreciate any help!

In a worksheet in row 1 from columns C to Z for example, is a set of data with a number in each column in ascending order however the same number can occur multiple times.

For example:

C D E F G H I J K L M N ...
1 1 2 2 2 3 3 3 3 4 5 5

Based on two cells in cells A1 and A2 I would like to hide columns not containing the range on numbers covered including and between those in A1 and A2.

Cell A1 would be the starting point - for example number 2.

Cell A2 would be the ending point - for example number 4.

The result would be:

E F G H I J K L
2 2 2 3 3 3 3 4


I believe the macro would be worksheet > change based on these cells.

I believe the best way to make it run is to populate cell A1 runs first, hiding everything except that number.

Then populate cell A2, unhiding from the number in A1 to the number in A2.


Im open to better ways of accomplishing this!


Any input would be greatly appreciated!


Many thanks in advance,


Coeus.