VBA: ComboBox based on the value from the first ComboBox

MarioMagnus

New Member
Joined
Jul 8, 2021
Messages
14
Office Version
  1. 2019
Platform
  1. MacOS
Hi,
I need help with a userform with two comboboxes.
The date in the minisheet is an example and the formula that I use workes within the sheet, but I need to bring this into a userform.
I select the name based on the column 1 and when a available name is selected, I need to run the formula to bring all available dates for the actually month in the combobox two.

I hope I could explain what I need. I hope you can help me with that problem.

Book1
ABCDEFGHIJ
1NameDatumMonat
2Yanik5/12/215
3Noémie5/13/215
4Yanik5/13/215
5Noémie5/14/215Noémie513/05/2021
6Yanik5/14/21514/05/2021
7Noémie5/15/21515/05/2021
8Yanik5/15/21516/05/2021
9Noémie5/16/21517/05/2021
10Yanik5/16/21518/05/2021
11Noémie5/17/21520/05/2021
12Yanik5/17/215 
13Noémie5/18/215 
14Yanik5/18/215 
15Noémie5/20/215 
16Yanik5/20/215 
17Yanik5/26/215 
18Noémie6/2/216 
19Yanik6/2/216 
20Yanik6/4/216 
21Noémie6/11/216 
22Yanik6/11/216 
23Noémie6/12/216 
24Yanik6/12/216 
25Noémie6/13/216 
26Yanik6/13/216 
27Sophie6/22/216 
28Noé6/22/216 
29Noémie6/23/216 
30Yanik6/23/216 
31Yanik6/24/216 
32Lars6/24/216 
33Yanik6/28/216 
34Noémie6/29/216 
35Yanik6/29/216 
36Noémie7/8/217 
37Yanik7/8/217 
38Yanik7/9/217 
39Noémie7/9/217
40Noémie7/10/217
41Yanik7/10/217
Sheet1
Cell Formulas
RangeFormula
J5:J38J5{=IFERROR(INDEX($B$2:$B$51, SMALL(IF(COUNTIF($G$5, $A$2:$A$51)*COUNTIF($H$5, $C$2:$C$51), ROW($A$2:$C$51)-MIN(ROW($A$2:$C$51))+1), ROW(A1)), COLUMN(A1)),"")}


Thanks, Mario.
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,214,631
Messages
6,120,645
Members
448,974
Latest member
DumbFinanceBro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top