Working with .Offset locations and running Macro through a loop

  • With some help, we've gotten REAL close!

    The first issue is fixing the .Offset code so that the copy range ("Q" & ActiveCell.Row & ":AF" & ActiveCell.Row) is "inserted" into the very next row (A:P) below the initial selected row, rather than (A2:P2) where it goes now. < This location seems to change if there are any blank rows near the top of the worksheet fwiw.

    Then I need some sort of loop that runs the macro until there's no more data in columns outside column P.

    Got some help here, but not heard back in 18 hours.

    Here's a quick example for clarification.

    1) Highlight, say, row 10 that includes cell ranges A10:P10, Q10:AF10, AG10:AV10, etc.
    2) Copy the cell range Q10:AF10
    3) Insert contents into cell range A11:P11
    4) Delete columns ("Q:AF")
    5) See code 'Added to move active cell up one row...
    6) So I can run a loop until there's no more data outside of column P. (Stop when there's data only in columns A to P.)

  • Re: Working with .Offset locations and running Macro through a loop

    Here's one possible solution jic a visitor from the engines needs it...

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!