YamMilkTea
June 6th, 2009, 06:24 AM
Hi, i am new to VBA Excel. I need help with the code for combobox.
I have a list of data in excel sheet,with the data in the cells as
A1: Name B1: Sex
A2: Alice B2: F
A3: Alan B3: M
A4: Ben B4: M
A5: Jane B5: F
A6: Tony B6: M
I insert a combobox to the Userform, with 3 selection, 'All', 'F' and 'M'.
If i select 'F', i want to get
A1: Name B1: Sex
A2: Alice B2: F
A3: Jane B3: F
If i select 'M', i want to get
A1: Name B1: Sex
A2: Alan B2: M
A3: Ben B3: M
A4: Tony B4: M
If i select 'All', all the data remains the same.
How can i achieve that?
I have a list of data in excel sheet,with the data in the cells as
A1: Name B1: Sex
A2: Alice B2: F
A3: Alan B3: M
A4: Ben B4: M
A5: Jane B5: F
A6: Tony B6: M
I insert a combobox to the Userform, with 3 selection, 'All', 'F' and 'M'.
If i select 'F', i want to get
A1: Name B1: Sex
A2: Alice B2: F
A3: Jane B3: F
If i select 'M', i want to get
A1: Name B1: Sex
A2: Alan B2: M
A3: Ben B3: M
A4: Tony B4: M
If i select 'All', all the data remains the same.
How can i achieve that?