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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Could anyone please reply it or any other way to do the same ?
<!-- / message --><!-- sig -->
 
Upvote 0

Forum statistics

Threads
1,213,557
Messages
6,114,291
Members
448,564
Latest member
ED38

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