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
 

Some videos you may like

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

ayazgreat

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

ADVERTISEMENT

Is there anybody here to solve it ?
<!-- / message --><!-- sig -->
 

ayazgreat

Well-known Member
Joined
Jan 19, 2008
Messages
1,151
Could anyone please reply it or any other way to do the same ?
<!-- / message --><!-- sig -->
 

Watch MrExcel Video

Forum statistics

Threads
1,123,400
Messages
5,601,467
Members
414,452
Latest member
Dannysamworth

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
Top