Checkbox Crateria

ayazgreat

Well-known Member
Joined
Jan 19, 2008
Messages
1,151
Hi All

I have devloped following Code and I need your help reagrding how to extrct data as per those checkboxes are checked.

Code:
With UserForm2
        .Show
          fdate = .ComboBox1.Value
         If .CheckBox1.Value = True Then F1 = .CheckBox1.Caption
         If .CheckBox2.Value = True Then F2= .CheckBox2.Caption
         If .CheckBox3.Value = True Then F3 = .CheckBox3.Caption
     End With
    Unload UserForm2
        ReDim b(1 To UBound(a, 1), 1 To UBound(a, 2))
        'fdate = Format(Sheets("DPS").Range("b19"), "mmm-yy")
       ' Prod = Sheets("DPS").Range("c19")
   With CreateObject("Scripting.Dictionary")
        .CompareMode = vbTextCompare
        For i = 1 To UBound(a, 1)
         [COLOR=red]  [COLOR=black]If (Not IsEmpty(a(i, 8))) * (IsDate(a(i, 8))) * (Format(a(i, 8),[/COLOR] "[COLOR=black]mmm-yy") = fdate) * (a(i, 5) <> "B")[/COLOR] * (a(i, 4) = F1) Then
[/COLOR]

I can not solve last red line code that how to code that if checkbox1 is checked then code extrcts checkbox1 data or if checkbox1 and checkbox2 are checked then extract both zone data.

I hope you understand that how could a user change seclection to extract data.

Thanks in advance
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,521
Messages
6,179,280
Members
452,902
Latest member
Knuddeluff

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