+ Reply to Thread
Results 1 to 12 of 12

Copying data from an existing sheet to exist with data outside excel

  1. #1
    Registered User
    Join Date
    02-04-2016
    Location
    United States
    MS-Off Ver
    2016
    Posts
    8

    Copying data from an existing sheet to exist with data outside excel

    I hope my title isn't confusing. I'll try to make this concise and not ramble. This is kind of a two part question.

    I had posted last week about trying to come up with a way to copy a selection of data from a worksheet to go on a new worksheet if an "X" was marked in the row under a certain heading.

    It worked perfectly.

    Now, after looking at it and showing associates, we feel it needs more information. In addition to the data that is copied, I want to be able to have additional information.

    I have the Excel sheet provided, and as you can see, the code is in place and you can see what is copied from 'Master Listing (KA)' to 'HSDP'. You can also see that there are two headings which don't have any data in them. These two pieces are coming from an enrollment list elsewhere within an entirely new workbook.

    *Part 1 question: There are participants that are within the HSDP that don't come from the Master Listing. Is there a way that once I run this code and add in the two remaining columns, that I can just type in new names to this list? The Master Listing changes so that means there could be new names added, and then by running the code it would erase names that have been typed in along with making things out of place because of the two columns being typed in as well. It might just make sense to add those two columns to the Master. But then I'd still be potentially erasing things with the typed in names and running the code. Two lists on the sheet?

    - The Heading marked dual enrollment is probably an easy fix. If columns 'I' and 'M' both have a check then that means they are dual enrolled.


    *Part 2 question: Would you recommend I just manually type and copy in the lists to the sheets? Ultimately, it probably wouldn't take very long and I could add in simple IF formulas to count the dual enrollment. Ideally though, I want Excel to do the busy work for me so I can spend it meeting with these people.

    Sorry if I rambled. Thanks for all the help. I REALLY appreciate it. This website is amazing.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copying data from an existing sheet to exist with data outside excel

    This might do both:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Copying data from an existing sheet to exist with data outside excel

    On sheet HSDP, add another column "G" (put any header you like in G3). Then for any names you manually type and don't want overwritten when you run the macro, put an X in that column (you could type in anything in that column). The macro below will first erase all rows that are blank in HSDP column G, then filter and copy the rows from Master KA to the next available rows on HSDP. If later you want to remove a name that was manually entered, just clear its column G and run the macro.

    It fills column F with an X if dual enrolled. I didn't follow where the Sending School data comes from.

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    02-04-2016
    Location
    United States
    MS-Off Ver
    2016
    Posts
    8

    Re: Copying data from an existing sheet to exist with data outside excel

    @ AlphaFrog

    Sending School is something I would have to manually type in since it comes from a different workbook. Its just an enrollment indicator that we would prefer to have on the HSDP sheet, even though it is not on the Master.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Copying data from an existing sheet to exist with data outside excel

    xladept's solution is better. I have the older Excel 2003. So I couldn't use the .RemoveDuplicates function.

    All he would have to do is add a copy from column I to column F for Dual Enrollment.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copying data from an existing sheet to exist with data outside excel

    @ AlphaFrog -

    These two pieces are coming from an enrollment list elsewhere within an entirely new workbook.
    I don't get the I to F ???

  7. #7
    Registered User
    Join Date
    02-04-2016
    Location
    United States
    MS-Off Ver
    2016
    Posts
    8

    Re: Copying data from an existing sheet to exist with data outside excel

    @xladept

    I stated in the OP that those who have an X in column I of Master means they are dual en-rollers on the HSDP sheet.
    Last edited by mschomisch1030; 02-09-2016 at 03:54 PM.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copying data from an existing sheet to exist with data outside excel

    Hi mschomisch,

    Thanks for the clarification and for the rep! Do you want that information also transferred?

  9. #9
    Registered User
    Join Date
    02-04-2016
    Location
    United States
    MS-Off Ver
    2016
    Posts
    8

    Re: Copying data from an existing sheet to exist with data outside excel

    If you don't mind

    Yeah, if you can show what the code is with the copying of column I on Master to Column F on HSDP, that would be most appreciated.

    I should take a class heh

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copying data from an existing sheet to exist with data outside excel

    I'll see what I can do tomorrow - I just got back from an engagement.

  11. #11
    Registered User
    Join Date
    02-04-2016
    Location
    United States
    MS-Off Ver
    2016
    Posts
    8

    Re: Copying data from an existing sheet to exist with data outside excel

    No problem, man. When you've got time.

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copying data from an existing sheet to exist with data outside excel

    Here's a hasty solution using a dictionary:

    Please Login or Register  to view this content.
    Last edited by xladept; 02-10-2016 at 02:17 PM.

+ 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. Copying a range of data into another Master workbook below existing data
    By Grizz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-24-2014, 06:24 AM
  2. how to fill the non exist data in drop down using vba form excel sheet
    By sateeshkumarj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2014, 01:27 AM
  3. [SOLVED] Check existing data before copying in new data to avoid duplication
    By lordterrin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-06-2013, 02:15 PM
  4. How to Edit Existing data of excel sheet
    By ashfaquebwd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2013, 09:24 AM
  5. Copying existing comments and data in a list using data validation.
    By labexcel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-03-2012, 05:41 AM
  6. Replies: 1
    Last Post: 08-15-2009, 05:52 AM
  7. [SOLVED] Copying Data into Column with Existing Data
    By GZul in forum Excel General
    Replies: 0
    Last Post: 02-09-2006, 07:35 PM
  8. Replies: 1
    Last Post: 03-29-2005, 08:06 AM

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