Input box filter

justdream

Board Regular
Joined
Dec 9, 2010
Messages
140
Office Version
  1. 2019
Dears,

I'm using input box filter to allow users entering their required data to be selected and filtered
as shown

Code:
Area = InputBox("Enter your required Area")
Range("A1").AutoFilter Field:=1, Criteria1:=Area

but I faced special case: some users want to select two variable (example: filter for Asia and USA)

how could I let users select multiple inputs
using above input box filter??
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Perhaps

Code:
area = InputBox("Enter your required Area Separated by Comma")
x = Split(area, ",")
If UBound(x) = 0 Then
    Range("A1").AutoFilter Field:=1, Criteria1:=area
Else
    Range("A1").AutoFilter Field:=1, Criteria1:=x(0), Criteria2:=x(1)
End If
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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