+ Reply to Thread
Results 1 to 5 of 5

String Manipulation?

  1. #1
    Forum Contributor
    Join Date
    03-03-2007
    Posts
    101

    String Manipulation?

    Hello,

    I'm having trouble getting my vlookup formula to work. Can someone help me?Attached is my workbook. I'm trying to get sheet1!B5 to pull from sheet2!B4.

    I can't change sheet2 in any way because that is how I download it from a separate application.
    I can only change what's in column B of sheet1.
    Everytime I download sheet2, there's no telling in which rows the numbers will appear, so I can't put the formula "=sheet2!B4" inside cell sheet1!B5. A simple cell-to-cell link simply won't do.

    There's an added complication because the string I'm looking up (sheet1!A5) is actually shown multiple times on sheet2 in nested phrases.

    I'm sure it's simple, but I'm clueless.
    Attached Files Attached Files
    Last edited by Sean Anderson; 03-26-2007 at 08:36 PM.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,470
    Hi Sean,
    your vlookup formula won't work because of the spaces in the other ranges, the trim function would be required to clean up the spaces

  3. #3
    Forum Contributor
    Join Date
    03-03-2007
    Posts
    101
    Hello Dave,

    Thanks for the advice.
    Attached is the modified workbook. I used the trim function to trim the spaces off of cell sheet1!A5, but I don't know how to incorporate a trim for sheet2. Modifying sheet2 is not an option. I'm stuck.
    Attached Files Attached Files

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,470

    Trim Macro

    Hi Sean,
    Here is a macro you can try
    Please Login or Register  to view this content.
    Last edited by davesexcel; 03-26-2007 at 09:08 PM.

  5. #5
    Forum Contributor
    Join Date
    03-03-2007
    Posts
    101
    Dave,
    Thanks a billion. That works! You saved my day.

+ Reply to Thread

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