+ Reply to Thread
Results 1 to 7 of 7

Search a column for a value and if it exists copy text from corresponding cell in column A

  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Search a column for a value and if it exists copy text from corresponding cell in column A

    Hi,

    I'm a bit stuck with a spreadsheet and was hoping someone might be able to help me create a macro.

    I have one wb (data) containing information about each person in a division (one row for each) and their asset number (in column A). I have another wb (apps) which contains all the applications on each asset. This is displayed in a matrix so the name of every application on site is in column A, the asset numbers in row 1 and a "1" in each cell where that asset contains that application.

    What I would like to do is:
    - Look in column A in wb(data) to get the first asset number
    - Look in wb(apps) for the column which contains that asset number
    - For all cells in that column which have the value "1" in, copy the corresponding values in column A (application name)
    - On wb(data), paste the application names into the Apps column, shifting all other rows down so that there is affectively a new row for every application
    - Find the asset number for the next row down and do the same again until the end of the sheet.

    Does that make sense?

    Any help would be hugely appreciated. I'm completely stuck here
    Last edited by badlydrunkboy; 07-02-2014 at 08:20 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: Search a column for a value and if it exists copy text from corresponding cell in colu

    Having tough time visualising your data, can you upload a sample?
    ________________________________________________________
    If your problem is solved, update the thread as SOLVED: Go to the top of the first post-Select Thread Tools-Select Mark thread as Solved OR - Go to the first post - Click edit- Click Advance- Just below the word "Title:" you will see a dropdown with the word No prefix.- Change to Solve- Click Save.

    Show your gratitude to the person who helped you solving your problem by clicking on star button at the bottom of such post.

  3. #3
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Search a column for a value and if it exists copy text from corresponding cell in colu

    Sorry, i always have trouble describing these things. I've attached two sample workbooks now.

    Cheers.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Search a column for a value and if it exists copy text from corresponding cell in colu

    Anybody?

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search a column for a value and if it exists copy text from corresponding cell in colu

    Maybe?

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-15-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    100

    Re: Search a column for a value and if it exists copy text from corresponding cell in colu

    That is amazing, thank you so so much!

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Search a column for a value and if it exists copy text from corresponding cell in colu

    You're welcome. Glad to help out and thanks for the feedback.

+ 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. Replies: 6
    Last Post: 01-08-2014, 01:56 PM
  2. search column for text, copy and paste into new column
    By adammss in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-14-2013, 07:12 PM
  3. [SOLVED] When a search term appears in column I, copy the value from column H to a new cell.
    By ShallowJamm in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-28-2012, 06:36 PM
  4. Search For Word in One Column, If Exists Put Text In Another Column
    By biohazard35 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-20-2012, 05:33 PM
  5. Replies: 3
    Last Post: 08-16-2012, 03:25 PM

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