+ Reply to Thread
Results 1 to 17 of 17

Copy data from column in one sheet to column in another sheet until blank in F

  1. #1
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Copy data from column in one sheet to column in another sheet until blank in F

    Ok all, need some help here. I have a worksheet, "District", that has names of team members from A2:A (The number of team members will vary, so I would need the macro to stop when the list ends). I need these to be distributed to column A on another sheet, "Input", from A11 down until it hits a row that has a blank cell in column F. I've tried a couple of things, but just can't seem to get it to work. Any help is appreciated!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,

    It would help to know what things you have already tried. Posting your workbook will give you the quickest turnaround.

  3. #3
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Quote Originally Posted by Leith Ross View Post
    Hello votekinky06,

    It would help to know what things you have already tried. Posting your workbook will give you the quickest turnaround.
    Primarily I've tried formulas to no avail, and I've tried recording the macro several times but can't figure out how to loop it and make it stop when it finds the blanks on both sheets. Here's the latest recorded macro I've tried, with some rough adjustments as to what I'm looking for (I know the macro is outrageously incorrect, just VERY new to this game):


    Please Login or Register  to view this content.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,

    It never fails when I am writing code, I get a phone call. Try this macro and let me know the results.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Quote Originally Posted by Leith Ross View Post
    Hello votekinky06,

    It never fails when I am writing code, I get a phone call. Try this macro and let me know the results.
    It's giving me a complie error, "Exit Do not within Do...Loop"

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,


    Sorry about that, the correct macro is below. This should work with no problems.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    It's giving me syntax error and highlighting the line below
    Please Login or Register  to view this content.

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,

    I need a vacation. I can not believe I have made so many obvious errors today. Change the line to this...
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    We're getting closer! It populates the first 19 names and then stops. If it makes it any easier it can just use column A on the "Input" sheet as a determination when to stop and stop when it hits a blank cell on A.

    Quote Originally Posted by Leith Ross View Post
    Hello votekinky06,

    I need a vacation. I can not believe I have made so many obvious errors today. Change the line to this...
    Please Login or Register  to view this content.

  10. #10
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,

    That's good news. I suspect it is stopping because of how I wrote it...
    I need these to be distributed to column A on another sheet, "Input", from A11 down until it hits a row that has a blank cell in column F
    Did I misunderstand the criteria?

  11. #11
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    No, that's correct. I have 400+ rows on "Input" that have data in column F and it's stopping after 19. Would it help if I uploaded a sample sheet?

    Quote Originally Posted by Leith Ross View Post
    Hello votekinky06,

    That's good news. I suspect it is stopping because of how I wrote it...

    Did I misunderstand the criteria?

  12. #12
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,

    If you can, that would be a great help.

  13. #13
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Here ya go!
    Master Forum Sample Initial State.xlsm

    Quote Originally Posted by Leith Ross View Post
    Hello votekinky06,

    If you can, that would be a great help.

  14. #14
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Hello votekinky06,

    Thanks for the workbook. This raises more questions for me. I don't see the relationship between the Team names and the other sheet. Can yo upost a sample of what the output should look like? Just a few lines would be fine.

    Also, please don't answer with "Replay With Qoute". It isn't necessary and clutters the response.

  15. #15
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Master Forum Sample Final State.xlsm

    Sorry about the quoting, years of forum habit. I've attached the desired result. I need the team names to be distributed amongst the rows as if I had pasted and then dragged the selection down. It's also worth noting that the team list will start as in this spreadsheet, not the first one uploaded, with the header in A1 and team names beginning in A2. The number of team members and the number of rows on the "Input" sheet will vary. Thanks for all of your help on this!

  16. #16
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    I tried all of the mods I could think of, but just can't figure this one out, do I need to add a line to get it to keep looping?

  17. #17
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Copy data from column in one sheet to column in another sheet until blank in F

    Also, not sure if it helps, but when it stops it fills the rest of the rows down with "#N/A"

+ 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. [SOLVED] Copy variable range from sheet to the last row with a specific blank column in new sheet
    By seputus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-22-2012, 07:29 PM
  2. Copy Data from one column in a sheet to another column present in 2nd sheet
    By pan07 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-21-2012, 12:50 AM
  3. column blank data only copy into new sheet
    By sekharyadav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-01-2012, 10:41 AM
  4. Copy column data on one sheet to row or column date on another sheet based on user in
    By soready42012 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-08-2012, 12:03 AM
  5. Copy Data from Column and Paste to Next Blank Column on 2nd Sheet
    By adammark in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2010, 11:15 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