+ Reply to Thread
Results 1 to 8 of 8

Copy rows from one workbook to another only if certain columns are active

  1. #1
    Registered User
    Join Date
    05-22-2017
    Location
    Colorado
    MS-Off Ver
    2016
    Posts
    4

    Copy rows from one workbook to another only if certain columns are active

    Is there a way with VB that I can have rows from one workbook copy into another workbook as long as there is text in a certain column?
    For instance, I want a list of contacts to be copied over into a separate workbook only if the contacts have an email address listed. If they do not have an email address, I dont want them copied over.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy rows from one workbook to another only if certain columns are active

    Hi tharnden

    Welcome to the Forum!!!

    I'd suggest Filtering on the Email Column to exclude Blank...Copy/Paste the Visible Cells...yes, it can be done in VB...
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    05-22-2017
    Location
    Colorado
    MS-Off Ver
    2016
    Posts
    4

    Re: Copy rows from one workbook to another only if certain columns are active

    That is how I have been doing it. I was hoping that if I used VB, as I updated the accounts in the first workbook, that the second workbook would update with the corrected information automatically. Am I correct?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy rows from one workbook to another only if certain columns are active

    Hi tharnden

    You'd need to develop some "Change Event" Code in the first workbook that finds the changed record in the second workbook and updates it...yes, it's do-able...

  5. #5
    Registered User
    Join Date
    05-22-2017
    Location
    Colorado
    MS-Off Ver
    2016
    Posts
    4

    Re: Copy rows from one workbook to another only if certain columns are active

    I am clueless when it comes to VB. Any Ideas?

  6. #6
    Registered User
    Join Date
    05-22-2017
    Location
    Colorado
    MS-Off Ver
    2016
    Posts
    4

    Re: Copy rows from one workbook to another only if certain columns are active

    never mind. I think i am just going to make it a point to always copy and paste from the first workbook into the second just so I always make sure I have the updated information

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy rows from one workbook to another only if certain columns are active

    Hi tharnden

    Any Ideas?
    Sure...you'll need to attach your Files (both Workbooks), explain what it is you're doing and why, if appropriate, so I understand your mission.

    The below is a Canned Reply...hopefully you'll get the message...I need to see what you have and where you wish to be...

    Please attach a sample workbook(s) the Structure of which is the same as your actual workbook(s).

    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.

    INCLUDE ANY CODE YOU'RE USING OR HAVE TRIED.

    Remember to desensitize the data.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Copy rows from one workbook to another only if certain columns are active

    OK...change your mind let me know...

    Quote Originally Posted by tharnden View Post
    never mind. I think i am just going to make it a point to always copy and paste from the first workbook into the second just so I always make sure I have the updated information

+ 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: 2
    Last Post: 11-23-2015, 03:07 PM
  2. [SOLVED] Copy Select Columns from closed workbook into active workbook
    By 3345james in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-09-2015, 02:04 PM
  3. Run Macro in closed workbook and copy specific coloumn in active workbook
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-07-2013, 03:43 AM
  4. Open workbook, filter values, copy/paste into Active workbook.
    By niceguy21 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-10-2013, 12:17 PM
  5. Get number of rows in a active worksheet in a active workbook
    By tamahome90 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2012, 09:06 AM
  6. [SOLVED] COPY from an open workbook with particular sheet and columns to active workbook
    By purin0c0 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2012, 03:57 PM
  7. [SOLVED] copy active sheet, create new workbook, name new workbook based on cell reference
    By jm0392 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2012, 07:12 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