+ Reply to Thread
Results 1 to 8 of 8

Formula or VBA that will search for a list of numbers and return the row entire string

  1. #1
    Registered User
    Join Date
    03-29-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    4

    Formula or VBA that will search for a list of numbers and return the row entire string

    Hi all.
    I am looking for a Formula or VBA that will return entire test strings based on a list of numbers. for example I have a spread sheet as follows and I would like to cut and paste a list of employee id numbers into a sheet and have the macro or formula return the entire row of information next to that number. Name, address etc.

    I don't want to have to enter each one individually as there is over 2000 rows of addresses etc. I have attached a sheet that will nearly do it but you have to enter a one value at a time.

    Capture.PNG
    Attached Files Attached Files

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    Hi
    does the attached help?
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    Highlight your table of stock (not including the headings) and give it a name eg Stock then in Sheet 2 use VLOOKUP to find the details of each item corresponding to the Id in column A.

    Eg
    In Sheet 2 cell b2 put
    =VLOOKUP(A2,Stock,2,false)
    This will lookup in the Stock table the item with the same ID as in cell A2 and return the corresponding value from the 2nd column of the range, by using False you tell it to only return a value if there's an exact match.
    If someone has helped you then please add to their Reputation

  4. #4
    Registered User
    Join Date
    03-29-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    4

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    Hi Pepe,
    No not really as I can still only enter 1 value to search for at a time. see attached file as a basic example of what I am trying to achive. It may be as simple as a formula rather than a VBA that will allow me to paste the list of numbers into the sheet and have it spit out the corresponding text strings.
    Attached Files Attached Files

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    Does the attached file using formulae do what you want?

    Hope this helps.

    Pete
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-29-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    4

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    cant open it pete

  7. #7
    Registered User
    Join Date
    03-29-2015
    Location
    Brisbane
    MS-Off Ver
    2010
    Posts
    4

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    yep works.

    did not realise you could give the group of cells a name. cheers for that

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,724

    Re: Formula or VBA that will search for a list of numbers and return the row entire string

    I didn't give them a name, so I don't know who you are responding to.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Search for a word within a list of names and return the entire name within the cell.
    By staljunk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-02-2015, 04:50 PM
  2. VLOOKUP Search String Against List of Numbers
    By 8bithack in forum Excel General
    Replies: 11
    Last Post: 09-02-2014, 05:35 PM
  3. [SOLVED] Search numbers in a text string, find largest "value" return a value
    By OilGasKing in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-27-2013, 09:01 PM
  4. Search an entire column for a value, return entire row.
    By jdsmith1895 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2012, 12:53 PM
  5. Search entire column, return entire row
    By Chris Gwynne in forum Excel General
    Replies: 0
    Last Post: 08-04-2011, 11:21 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1