+ Reply to Thread
Results 1 to 8 of 8

Automatically copy and paste a row into a new worksheet based on a value

  1. #1
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    20

    Automatically copy and paste a row into a new worksheet based on a value

    Hi all,

    I am currently trying to piece together a document at work in which all our major projects identify their interdependencies upon one another as to proactively monitor risks.

    I currently have 12 sheets, each labelled by the project reporting the ID. So, in sheet ABC, column B "Project" will be "ABC" for every single row. However column D will be the project ABC is dependent on, so for example 123. So I can clearly see what "ABC" is dependent on.

    The problem is that I want to have a sheet whereby I can simply run something, that will locate "ABC" in column D, thus pulling every row from every single worksheet that matches that onto a new worksheet, which will show me everything that is dependent on "ABC".

    Is there a way to do this? It's worth noting that this sheet is constantly being updated and is available on share point, so the user using the search formula will use it for different project codes.

    Let me know if I haven't explained it well enough.

    Cheers,
    Matt

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Automatically copy and paste a row into a new worksheet based on a value

    Could you not use Column E to list Dependants?

    I could use a macro to populate column E

    My question is which row to put the data in to.
    Last edited by mehmetcik; 08-08-2017 at 03:40 AM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    20

    Re: Automatically copy and paste a row into a new worksheet based on a value

    This would need to be on a separate sheet. Each row is for a single Interdependency with a unique ID, and so I would prefer the info to be automatically copied across to a new sheet?
    Last edited by AliGW; 08-08-2017 at 04:54 AM. Reason: Unnecessary quotation removed.

  4. #4
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Automatically copy and paste a row into a new worksheet based on a value

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  5. #5
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    20

    Re: Automatically copy and paste a row into a new worksheet based on a value

    I have attached below.

    So if we take Project A, I can see everything that A is dependent on to deliver the project.

    I want to run something in "Run Lookup" sheet that will draw all the rows from across the sheet that contains "ProjectA" in column D. This will the create a view where I can see everything that is dependent on Project A.

    Hope this makes more sense.

    Matt
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Automatically copy and paste a row into a new worksheet based on a value

    I have created three Macros for you.

    The first runs whenever to go to the sheet "Run Lookup"

    Right Click on the sheet name at the bottom of excel and select view code

    Paste this into the module that opens and close it.

    Please Login or Register  to view this content.

    Then Create a userform with a list box

    Double click on the listbox and paste these two macros into the module that opens and close it.

    You are ready to go.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 08-08-2017 at 07:05 AM.

  7. #7
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    2016
    Posts
    20

    Re: Automatically copy and paste a row into a new worksheet based on a value

    Honestly Sir, you are an absolute God of Excel I have been trying to do this for so long!

    So no matter how many new sheets I create, it will no impact it as the macros are set to ignore certain pages, as opposed to including? (I am a complete rookie at this!)

    Matt

  8. #8
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Automatically copy and paste a row into a new worksheet based on a value

    Yes

    this line tells the macro which pages to ignore:-

    Please Login or Register  to view this content.

+ 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. Help needed please for VBA to automatically copy/paste value only as data entered
    By phiavaughan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-25-2016, 10:00 AM
  2. [SOLVED] Automatically copy paste into cells based on cell value
    By Excel_Tim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2016, 05:26 AM
  3. Replies: 2
    Last Post: 10-09-2014, 09:21 AM
  4. Macro needed to find cells that are automatically populated, then copy and paste
    By ten10thmuse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-04-2014, 04:34 PM
  5. Automatically copy and paste rows based on cell value
    By no.18shirt in forum Excel General
    Replies: 3
    Last Post: 06-15-2013, 12:14 AM
  6. Automatically Copy and paste cells based on colour
    By no.18shirt in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2013, 04:21 AM
  7. Automatically copy date from DTpicker and paste into hidden worksheet
    By msexceljones in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2012, 07:08 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