Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Vlookup - Multipel results

Good day,

i am very new at this game and have written some code to do a Vlookup to
find the name entered into an input box, it works fine but the problem
is there are at times more than one with the same Surname!
Could somebody help me with some code that would enable me either see a
list of the names or to "find next" and display?


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Vlookup - Multipel results

Try applying an Autofilter to your data (Data=Filter=Autofilter). Set the
surname filter to the surname of interest and all lines with that surname
will be visible, while others will be hidden. If you need a macro, you can
turn on the macro recorder while doing it manually. It is only a single
command with a few arguments. Vlookup would be the wrong command to use.
Match would tell you the first row where the data is found, so if you don't
want to use the autofilter, you would use match and then if the list is
sorted by surname, you could search below that location. Another approach
would be to use the Find method of the range object. The example code in
the help file shows you how to search for multiple instances. The would be
expecially appropriate if your list is not sorted.

--
Regards,
Tom Ogilvy

"Les Stout" wrote in message
...
Good day,

i am very new at this game and have written some code to do a Vlookup to
find the name entered into an input box, it works fine but the problem
is there are at times more than one with the same Surname!
Could somebody help me with some code that would enable me either see a
list of the names or to "find next" and display?


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Vlookup - Multipel results

Thanks Thom,

Your help is appreciated

Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Copy and insert multipel rows after each row of data myork Excel Discussion (Misc queries) 2 June 4th 10 06:24 AM
IF/VLOOKUP with #N/A results Supe Excel Discussion (Misc queries) 6 July 2nd 09 09:30 PM
Sum results of VLOOKUP Dewayne Excel Worksheet Functions 7 November 28th 07 04:53 PM
Scatter chart, show multipel points POP Charts and Charting in Excel 1 October 4th 07 02:33 PM
sum with multipel ifs [email protected] Excel Discussion (Misc queries) 2 October 17th 05 04:57 AM


All times are GMT +1. The time now is 03:45 PM.

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"