Help on setting up a search page

RandyL21

New Member
Joined
May 21, 2014
Messages
1
I am trying to setup a search page in a worksheet on a document. I want to be able to search by an indicator (DID#), but there maybe multiples of the same (DID#) in the data. I want to be able to have each instance of the multiples displayed on the search page. In addition, I want to reference other data that matches that (DID#) in seperate cells.

Please see below, I want to have a search area that I can input the DID# and have a return of the corresponding info for that row. If I search "123" there are 2 entries and will need both displayed. The data is much bigger, but this is just a sample.

Can someone please help me with this, I would prefer a formula based solution, but I am OK with VBA.

Thanks,
Randy

Date
DID#
Location
Type
Owner
12/13/14
123
Anywhere
Flooring
RL
2/8/14
567
Springfield
Painting
SA
4/1/14
123
Anywhere
Break/Fix
SL
3/16/14
490
Somewhere
Flooring
RL

<TBODY>
</TBODY>
 

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"
DateDID#LocationTypeOwner







SearchClear







DateDID#LocationTypeOwner


########
123
AnywhereFlooringRL


2/8/2014
567
SpringfieldPaintingSA


4/1/2014
123
AnywhereBreak/FixSL


########
490
SomewhereFlooringRL
























<tbody>
</tbody>



Sub clear_filter()
With ActiveSheet
.AutoFilterMode = False
.Range("A5:E1000").AutoFilter
.Range("A2:E2").ClearContents
End With
End Sub


Sub search_filter()
With ActiveSheet
.AutoFilterMode = False
If .Range("A2").Value <> "" Then .Range("A5:E1000").AutoFilter Field:=1, Criteria1:=.Range("A2").Value
If .Range("B2").Value <> "" Then .Range("A5:E1000").AutoFilter Field:=2, Criteria1:=.Range("B2").Value
If .Range("C2").Value <> "" Then .Range("A5:E1000").AutoFilter Field:=3, Criteria1:=.Range("C2").Value
If .Range("D2").Value <> "" Then .Range("A5:E1000").AutoFilter Field:=4, Criteria1:=.Range("D2").Value
If .Range("E2").Value <> "" Then .Range("A5:E1000").AutoFilter Field:=5, Criteria1:=.Range("E2").Value
End With
End Sub

Assign the macros to the search and clear button. You can input any combination of five criterias
 
Upvote 0

Forum statistics

Threads
1,215,417
Messages
6,124,783
Members
449,188
Latest member
Hoffk036

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