Results 1 to 10 of 10

Lookup value from list, return surrounding data.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-19-2009
    Location
    Toulouse, France
    MS-Off Ver
    Excel 2010
    Posts
    130

    Lookup value from list, return surrounding data.

    Hello

    I have a list of names on sheet 3. On sheet 2 a large data set. I'm trying to figure out vba that will look for every occurrence of each name in sheet 2 (only in column E) and return a range of values or block of cells surrounding each occurrence into sheet 4. To illustrate what i mean i'll give an example. One name in the list in sheet 3 is Peter i would like the vba to look for every occurrence of Peter in sheet 2 lets say the first occurs in E24 I would like the values in D24 (the cell just to its left) F24,G24,H24 (3 cells to the right) and D25,E25,F25,G25,H25 to be returned into sheet 4 (sorry wasn't sure how to reference those) and the same for the next occurrence. The name will always occur in column E i would like all other instances of each name that is not in E to be ignored. The data will always be Column D to H on the row of the occurrence and the D to H on the row below. I dont even know where to begin. Any help would be greatly appreciated. Regards

    Dan
    Last edited by Cicada; 07-21-2011 at 11:11 AM.

Thread Information

Users Browsing this Thread

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

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