Hi,
I want to create a UserForm to filter data, I start by doing like below to get the unique values of the data before it's being filtered:
The UserForm has 3 ComboBoxes where each for the YEAR, MONTH and DATE.
The UserForm_Initialize works, as each ComboBox show the result correctly.
With the codes below, I'm hoping that if (for example) I change the MONTH ComboBox value to (for example) "January" :
1. it will filter the column MONTH in Sheets ("DATA") to "January"
2. it will show each unique values of the filtered data for the column DATE of the Sheets "DATA" in the ComboBox DATE.
3. it will show each unique values of the filtered data for the column YEAR of the Sheets "DATA" in the ComboBox YEAR.
I realize that the green code is wrong, as the ComboBox of DATE and YEAR is showing the same result from the UserForm_Initialize, because it seems the code reads from the whole rows (not the filtered rows) either in column Q or column B of Sheets ("DATA").
My question is:
How to get the unique values from the filtered data of column YEAR & DATE in Sheets ("DATA") and then populate them to the ComboBox ?
Any kind of respond would be greatly appreciated.
Thank you in advanced.
Bookmarks