+ Reply to Thread
Results 1 to 3 of 3

How to retrieve data from another column next to the string you search for.

  1. #1
    Registered User
    Join Date
    04-22-2018
    Location
    Stockholm.Sweden
    MS-Off Ver
    Office 365
    Posts
    3

    How to retrieve data from another column next to the string you search for.

    Hi,
    I try to search for a string in column A in several workbooks and want to retrieve the data in column D when I found the string I search for.
    I found a formula almost working with the exception that it shows the colum I search for. Are there any easy way I can change the last statement in the below formula so it shows the data in column D instead of the String value I search for in column A?

    If xFound Is Nothing Then
    Exit Do
    Else
    xCount = xCount + 1
    xRow = xRow + 1
    .Cells(xRow, 1) = xWb.Name
    .Cells(xRow, 2) = xWk.Name
    .Cells(xRow, 3) = xFound.Value

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to retrieve data from another column next to the string you search for.

    This offsets 3 column from xFound in column A to column D

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    04-22-2018
    Location
    Stockholm.Sweden
    MS-Off Ver
    Office 365
    Posts
    3

    Re: How to retrieve data from another column next to the string you search for.

    Many thanks. You saved me lots of time.

    Very much appreicated.

    Br Thomas

+ 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. Search for string in several workbooks and retrieve data from another column?
    By ESEKOCK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2018, 12:52 PM
  2. [SOLVED] Search value on a string column to retrieve corresponding attribute
    By Cleins in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2018, 02:22 AM
  3. Search 4 columns of data for a match and retrieve from a 5th column
    By P Hawk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-29-2015, 05:38 PM
  4. [SOLVED] Search for a string and retrieve string from an adjacent cell.
    By djt80 in forum Excel General
    Replies: 5
    Last Post: 01-27-2015, 03:57 PM
  5. [SOLVED] Search for string across header row, then search for another string down found column
    By TucsonJack in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2012, 02:09 PM
  6. Replies: 1
    Last Post: 04-23-2012, 10:27 AM
  7. Replies: 2
    Last Post: 05-27-2009, 12:02 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