1 Attachment(s)
Filter data based on combobox value problem
I have 2 comboboxes that search a number of worksheets and add the filtered results to a named sheet. I have attached a working example of my file.
My problem is that I cannot get my second search for date to work. With my location search, the names are added to the combobox by code as they remain constant. The problem with the second combobox is I need to add the dates to the list and then be able to select a particular date resulting in a filtered sheet just like my location search.
1. I click on my combobox1 which runs the code to merge data from all worksheets begining with letter "D"
2. It then populates combobox1 with the dates in column "I" of my merged worksheet ("MasterSheet").
3. I can select a date from my list and it then creates a view based on the date selected.
I just cant get the dates to display in my combobox, can anyone spot what I am doing wrong?
Thanks in advance
Re: Filter data based on combobox value problem
Can you post the code where you fill the combo with dates?
Are you using two columns on the combo - one hidden?
Convert the dates to text? (format function)
Re: Filter data based on combobox value problem
Ecniv,
I am just trying to use:
Dim myDateRange As Range
UserForm1.ComboBox1.Value = myDateRange
I defined the range using the insert/define bit on the menu bar.
I dont have a hidden column, at least not deliberately, and the date is currently formatted as: dd/mm/yyyy. Does any of that mean anything?
Re: Filter data based on combobox value problem
Quote:
Originally Posted by New2This
Ecniv,
I am just trying to use:
Code:
Dim myDateRange As Range
UserForm1.ComboBox1.Value = myDateRange
I defined the range using the insert/define bit on the menu bar.
I dont have a hidden column, at least not deliberately, and the date is currently formatted as: dd/mm/yyyy. Does any of that mean anything?
I have not seen a combo box filled like that... ;) always a first time.
When I do this I usually loop thorugh and add the data to the combo box using additem (or .add). If you read up on these and see if they help...
Once you have a combo box of dates, and you select one, you need to put it somewhere on a sheet so your formulas etc can use it to show the data on a filtered sheet.
I have see this done, but it escapes me how. I think is is if, vlookup and conditional formatting combined creatively.