+ Reply to Thread
Results 1 to 6 of 6

Isolate the last 3 used area of the column

  1. #1
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Isolate the last 3 used area of the column

    Hello, few years back. I do have problem finding last empty cell on a column and inserting, copy paste the last non empty column. Now, I do have same problem again but this time I have to copy the last 3 non empty columns and paste it on 3 inserted column. Here is the piece of successful code with my previous problem. Hope you can modify it. Thanks!

    Please Login or Register  to view this content.
    Last edited by emina002; 03-07-2014 at 03:51 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Isolate the last 3 used area of the column

    How about (try it):

    Please Login or Register  to view this content.
    I just added two lines and one declaration of variable. Looking at the structure - it shall work. Or if I understand wrong your concept - try another mod:

    Please Login or Register  to view this content.
    just a small tip:

    Next time post a tiny sample workbook with few input data and desired (manualy "calculated") results.
    It makes much easier to test few concepts and choose the best one for those who try to help.
    Best Regards,

    Kaper

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Isolate the last 3 used area of the column

    PS. depending on data layout and filled/empty cells it could be wise to add a security measure to the final lines:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: Isolate the last 3 used area of the column

    Hi sorry if I didn't attach sample workbook. Kindly see below sample workbook. Since this is a monthly report,let assume that on row 2,it will find an empty cell which is on Column E. I have to copy the last 3 previous column(A,the merge column/row B,C and D,may be 4 columns since B and C are merge),and insert copied cells as the macro select Column E(which the macro found empty cell on row 2). See the must be result tab. If you notice Column E to H is populated already, with the details on last 4 columns. For the next month, I have to open the workbook and create another report for current month(eg: February report), if the code will identify the last empty cell on row 2 and it would be on Column I now. I just embed your modify code and it just copy the last non empty column 3x. Let me know if the example is not yet clear. Thanks.
    Attached Files Attached Files

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,863

    Re: Isolate the last 3 used area of the column

    OK. Then yet another approach (and you are right - there are 4 columns indeed, just 3 headers):
    Please Login or Register  to view this content.
    As you see the only change (marked blue) from the original code, is to move c cell left 3 columns from original and made c 4 columns wide before setting rng Range (to be copied and inserted).

  6. #6
    Forum Contributor
    Join Date
    05-16-2011
    Location
    Philippines
    MS-Off Ver
    Excel 365/Excel 2016
    Posts
    315

    Re: Isolate the last 3 used area of the column

    Wow it works. I tried to modify the code but when I run it, it getting error. Now my problem solved now. Thanks @Kaper

+ 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] Isolate sum from cumulative sums in a column
    By nrrrrb in forum Excel General
    Replies: 4
    Last Post: 07-29-2013, 10:44 AM
  2. Isolate rows based on first column
    By justinsmyth1 in forum Excel General
    Replies: 5
    Last Post: 06-22-2012, 06:46 PM
  3. Isolate Duplicates in Column B if Column A also Duplicate
    By Ocean Zhang in forum Excel General
    Replies: 4
    Last Post: 03-13-2012, 04:26 PM
  4. Tuning column chart to get area-column effect
    By goels in forum Excel General
    Replies: 2
    Last Post: 06-07-2011, 01:02 PM
  5. Isolate 1st 2 letters in a column
    By Curalice in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-06-2007, 04:49 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