Solved

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

Posted on 2011-09-29
16
194 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 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:Arno Koster
Arno Koster 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
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 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 33

Assisted Solution

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

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
 
LVL 33

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 33

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 33

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 33

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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
78 files, need to delete row 2 in every file 3 33
Vlookup Help 3 29
Excel - merge column values 3 26
WIthin VBA summing record count in 3 tabs 7 38
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

734 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