?
Solved

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

Posted on 2011-09-29
16
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
16 Comments
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1600 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:Arno Koster
Arno Koster earned 200 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 200 total points
ID: 36815404
I'm sure I've mis-understood the question.  Please use the attached to clarify.

thanks

Ian

DisplayListResult.xlsx
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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 33

Accepted Solution

by:
Rob Henson earned 1600 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 33

Assisted Solution

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

Assisted Solution

by:Rob Henson
Rob Henson earned 1600 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
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1600 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 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1600 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 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1600 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 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1600 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

771 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