Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Howard
 
Posts: n/a
Default Search engine in excel

I have a list of employee on one worksheet and on the second worksheet
worksheet I created a search engine ... but i need to display the information
of the result of the search on the second worksheet. I need the result to say
display all the employee that are 24 years old ....

How do i do that plz help
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Search engine in excel

Try this:
Here's an approach to try:
Assumptions:
On Sheet1 contains your data in cells A1:B10
On Sheet2 is where you want the extracted data to be displayed

Using Sheet2:
A1: EmpID
B1: Age

InsertNameDefine
Names in workbook: Sheet2!rngDest
Refers to: =Sheet2!$A$1:$B$1

I1: EmpID
I2: 24

InsertNameDefine
Names in workbook: Sheet2!rngCriteria
Refers to: =Sheet2!$I$1:$I$2

Next...still on Sheet2:
InsertNameDefine
Names in workbook: Sheet2!rngSource
Refers to: =Sheet1!$A$1:$B$10

(Notice: you are on Sheet2, and creating a Sheet2 level range name, but
the referenced range is on Sheet1)

The reason: An advanced filter cannot SEND data to another sheet, but
it can PULL data from another sheet.

Now...set up the Advanced Data Filter:
DataFilterAdvanced Data Filter
Select: Copy to another location
List Range: (press F3 and select rngSource)
Criteria Range: (press F3 and select rngCriteria)
Copy To: (press F3 and select rngDest)
Click [OK]

Note: if you want to run that Advanced Data Filter repeatedly, you'll need
to re-select rngSource each time....OR...

You can build a simple macro to automatically re-run the filter:
In a general vba module, enter this code:

'---Start of Code-------
Option Explicit
Sub PullMatchingData()
Range("Sheet2!rngSource").AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Range("Sheet2!rngCriteria"), _
CopyToRange:=Range("Sheet2!rngDest"), _
Unique:=False
End Sub
'---Start of Code-------

To run the code:
ToolsMacroMacros (or [Alt]+[F8])
Select and run: PullMatchingData

To test, change the value of I2 and run it again.

Does that help?

***********
Regards,
Ron


"Howard" wrote:

I have a list of employee on one worksheet and on the second worksheet
worksheet I created a search engine ... but i need to display the information
of the result of the search on the second worksheet. I need the result to say
display all the employee that are 24 years old ....

How do i do that plz help

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
How do I get excel search through a range of numbers e.g. 1.99 - . govworker Excel Worksheet Functions 2 December 15th 04 08:47 PM
How do I search for an asterisk in an Excel file--it thinks the a. ace Excel Discussion (Misc queries) 3 December 9th 04 04:23 PM
Excel - Formula Query: Search for and Return Value Sue Excel Worksheet Functions 3 December 7th 04 12:35 AM


All times are GMT +1. The time now is 11:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"