+ Reply to Thread
Results 1 to 7 of 7

Loop Until Empty Cell

  1. #1
    Registered User
    Join Date
    05-02-2012
    Location
    bc
    MS-Off Ver
    Excel 2007
    Posts
    21

    Loop Until Empty Cell

    Hello,

    Ended up with some compouding issues on my last post and decided to delete and split into two posts.

    Have a spreadsheet with student performance and a macro to copy each student's data from the master sheet into a new tab.

    The macro now creates a tab for each cell in the range, as some co workers have smaller classes, would like to modify the macro to stop when it hits an empty cell. Tried Do until isempty but was not able to make that work. Any suggestions would be great. Thanks.

    the macro
    Please Login or Register  to view this content.
    Test1.xlsm

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Loop Until Empty Cell

    try changing your range "rRange" to this:
    Please Login or Register  to view this content.
    This will limits your range to the number of students in column A.
    Regards
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Loop Until Empty Cell

    Please Login or Register  to view this content.
    Gary's Student

  4. #4
    Registered User
    Join Date
    05-02-2012
    Location
    bc
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Loop Until Empty Cell

    That is great, thanks a lot!

    One thing that I've noticed is that the formula for group averages along the row 5 is inserted as a value in students 2 and beyond but a formula for student 1 - the result is that student 1's group averages equal his score. Is there something I can adjust there so that that doesn't happen?

    Thanks!

  5. #5
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Loop Until Empty Cell

    do the following change and it should copy the formulas:
    Please Login or Register  to view this content.
    Using "pastespecial" will keep your formula.

  6. #6
    Registered User
    Join Date
    05-02-2012
    Location
    bc
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Loop Until Empty Cell

    Thanks, applied to all the cells as desired but am looking to get just the values from the cells and not the formula - is there a modification to this that will paste values from the "all students" page only so that I only have one tab that requires formulas?

    Thanks!!

  7. #7
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Loop Until Empty Cell

    change the paste special line with the following:
    Please Login or Register  to view this content.
    You will actually copy the data twice. First you copy only values and number format then you copy cells format to get the same look.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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