Identify letters but not spaces

Discussion in 'Word VBA' started by eko1130@gmail.com, May 9, 2014.

  1. Guest

    Hi all,

    I have two tabs within an excel file, each with two columns. The first column in each tab has titles such as "A1" "A2", etc. that are the same betweenthe two tabs. The second column in each tab is for values corresponding toeach value.

    Im copying data from the second tab to the first tab. So I want to write a program that identifies the titles in the first tab, finds which ones in the second tab match to it, and then copy the corresponding value for that title from the second tab to the first tab--this is because the second tab, the source, has some extra titles and values that arent needed. I only need values for the titles in the first tab.

    Now i have that all done--im matching the titles. My only problem is if thetitle in one tab is "A1 " (note the space) and the second title is "A1", it wont identify them as the same.

    Is there a way to make it identify only the letters? Or one other thing I was thinking was if there was a way to trim the space each time so they match up?

    All suggestions are welcome

    Thanks
     
    , May 9, 2014
    #1
    1. Advertisements

  2. Since this newsgroup deals with VBA for Word, you might have better
    luck posting in one that deals with macros for Excel.
     
    Barry Schwarz, May 10, 2014
    #2
    1. Advertisements

  3. Stefan Blom Guest

    You could ask in an Excel newsgroup.

    However, you may have more luck in an Excel forum in the Microsoft
    Community. Go to
    http://answers.microsoft.com/en-us/office/forum/excel?sort=lastreplydate&dir=desc&tab=Threads
    and/or the Office programming forum at
    http://answers.microsoft.com/en-us/office/forum/customize?sort=lastreplydate&dir=desc&tab=Threads.

    --
    Stefan Blom
    Microsoft Word MVP
     
    Stefan Blom, May 10, 2014
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.