Here's the setup: I have a listbox of values (Dates, to be specific) and I want to create a macro that will select corresponding columns of data (the first item in every column will be a date). The thing is that the selected columns may be non-sequential (there may be gaps between selected columns).
For example:
In the given data: (always be in the same format)
5/1/01 6/1/01 7/1/01 8/1/01 9/1/01 10/1/01
2 4 1 8 5 5
5 5 4 3 9 11
3 6 2 7 7 9
7 1 1 2 5 0
There would be a corresponding listbox containing the dates: (dates in listbox can change)
5/1/01
7/1/01
8/1/01
10/1/01
I would only want the columns with these dates to be selected. Should I use HLOOKUP to make my selection? If so, how??
For example:
In the given data: (always be in the same format)
5/1/01 6/1/01 7/1/01 8/1/01 9/1/01 10/1/01
2 4 1 8 5 5
5 5 4 3 9 11
3 6 2 7 7 9
7 1 1 2 5 0
There would be a corresponding listbox containing the dates: (dates in listbox can change)
5/1/01
7/1/01
8/1/01
10/1/01
I would only want the columns with these dates to be selected. Should I use HLOOKUP to make my selection? If so, how??