Solved

Is it possible to have Excel 2007 display a list of result

Posted on 2011-09-29
16
190 Views
Last Modified: 2012-05-12
We have used vlookup, find, search, mid, left, right, etc. to search and display a singular cell contents.  But can Microsoft Excel  2007 be used to display a list of results?

Attached is an Excel with what we think it would be set out.  In this example we have an area where the 'Data' is store, then where the user inters the data to search, finally, the Results display area.  

Is this possible? and how can we go about it?


DisplayListResult.xlsx
0
Comment
Question by:rayluvs
16 Comments
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36815353
Looks like you can use the AutoFilter or Advanced Filter functions for this.

Auto Filter would filter in place whereas Advanced Filter can be used to filter to another location.

Adv Filter would be better for your purpose as it requires 3 inputs:
Data Range - Your Data
Criteria Range - your Enter Data to display range for your example this would be input as *speed*
Output Range - your Results.

This can be automated so that it updates at the click of a button if so required.

Does this sound like a way forward?

Thanks
Rob H
0
 
LVL 19

Assisted Solution

by:akoster
akoster earned 50 total points
ID: 36815372
sure.

easiest way is to place a filter on the data range and select "text filter" - "contains" - "*speed*"

as in the M column

 DisplayListResult.xlsx
0
 
LVL 1

Assisted Solution

by:Doddsy1000
Doddsy1000 earned 50 total points
ID: 36815404
I'm sure I've mis-understood the question.  Please use the attached to clarify.

thanks

Ian

DisplayListResult.xlsx
0
 

Author Comment

by:rayluvs
ID: 36815410
Yes, that's what we're looking for.

But is there a way to go straight to "Contains" instead of Click Filter >> Text Filter >> Click Contains ?
0
 
LVL 31

Accepted Solution

by:
Rob Henson earned 400 total points
ID: 36815540
See attached, your original and a Copy sheet.

Filter button on the Copy sheet runs this routine:

Sub Filter()
'
' Filter Macro
' Macro recorded 29/09/2011 by Rob Henson
'

'
    Range("K7").Select
    Selection.CurrentRegion.Select
    Selection.ClearContents
    Range("K7").Select
    
    Range("D7").Select
    Selection.CurrentRegion.Select
    With Selection
        .AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
        "H7:H8"), CopyToRange:=Range("K7"), Unique:=False
    End With
    
End Sub

Open in new window


That clears the result area and filters the Data.

Thanks
Rob
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36815566
Ooops, attachment.
Display-List-Result.xls
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36815662
The ranges in the routine are currently 'hard-coded'.

As the data will no doubt change shape, the ranges can be made dynamic.

Thanks
Rob H
0
 

Author Comment

by:rayluvs
ID: 36818365
Great!... i see that in order for CONTAIN to work, there has to be '*'.  Can the filter always use CONTAIN so the user just enter the word|? (for example if I enter 'speed' nothing is display, but if i enter *speed or *speed*, it does)
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36818421
I guess you could set a change event on the sheet that whenever anything is added to the search list an * is added.

Alternatively, you could use the same input but have the actual criteria list of to one side with formulae populating the * onto the words entered.  This new criteria list would then have to be dynamic so that the filter knows how many rows it needs to look at.

Thanks
Rob H
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36818427
BTW in case you weren't aware the * is a wild card for any character(s). You can also use ? for a single character.
0
 

Author Comment

by:rayluvs
ID: 36893357
I just finished incorporating your recommendations and it doesn't work.

Question:

The title all have to be 'Data'? (we have other titles)
0
 

Author Comment

by:rayluvs
ID: 36893361
i just tested changing, it seems that all title have to be the same?
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36894210
Yes the tiles have to be the same, or at least the cell above the first row of data!!

The Advanced Filter function is saying:

Look at table of values, in column Data find the values specified in the criteria table with criteria for column Data and return the values that match the criteria. It would make more sense if you had more columns, the example in the Help is very basic but proves the point. It has an orchard with multiple trees of different fruits with various heights and ages.

So you have columns for:

Fruit    Height (Ft)    Age (Yrs)
Apple  10                 2
Pear    10                 1
Apple    6                  1
Apple    5                  1

You could then set up a criteria table with

Fruit       Height(Ft)
Apple     >5

The result would then be:

Fruit    Height (Ft)    Age (Yrs)
Apple  10                 2
Apple    6                  1

As you can see you only need the column headers for those columns for which criteria are being specified. Likewise the result table can be preset with only the headings you require data to b extracted for.

In your example you could make the headings different by adding more to the cell above, like you did for the criteria in your original post; the AF looks at only the first row of the range specified and treats that as the header.

Thanks
Rob H
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 400 total points
ID: 36894229
Reading your question in a different light, possibly answered with the Orchard example, the title doesn't have to be "Data" but the titles of the columns in the data have to be repeated in the title for the criteria and will then be repeated in the title for the result. Going on from what I suggested about adding to the cell above the header, the result will only have the immediate header so any extra titles will have to be added before and will stay when the filter is refreshed if the result area is set as the row below.

Thanks
Rob H
0
 

Author Comment

by:rayluvs
ID: 36894516
Thanx you very much!
0
 

Author Closing Comment

by:rayluvs
ID: 36896948
Thanx
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now