# Checkbox Crateria

#### ayazgreat

##### Well-known Member
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
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.

### Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Could anyone please reply it or any other way to do the same ?

Is there anybody here to solve it ?

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

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

Could anyone please reply it or any other way to do the same ?
<!-- / message --><!-- sig -->

Could anyone please reply it or any other way to do the same ?

Replies
12
Views
579
Replies
1
Views
276
Replies
1
Views
854
Replies
8
Views
1K
Replies
4
Views
304

1,220,011
Messages
6,151,447
Members
451,028
Latest member
greekness1

### 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.

### Which adblocker are you using?

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

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