+ Reply to Thread
Results 1 to 7 of 7

Drag down cells until last text cell

  1. #1
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Drag down cells until last text cell

    Hi,

    I want to create a macro that will drag down a range of cells with formulas to the last cell with text on it. How can I do that.

    I attach an example of what I want to do.

    I want to select D3:G3 and drag it down to D8:G8. I want the rows to be dynamic since it will not always be row 8 until I will need to drag down.

    Regards!
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Drag down cells until last text cell

    Maybe this

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Drag down cells until last text cell

    HI Mike!!

    Thanks a lot. But how can i make the range variable since it will no always be row 3??, the columns will always be the same but the rows will vary!

    Regards!!

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Drag down cells until last text cell

    Not sure Im following you. It wont matter how many rows there are it will copy down.

  5. #5
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Drag down cells until last text cell

    Hi Mike

    What I mean is that my database will be updated daily from columns A:C so right now my last cell with value in column D:G is 3 but the day after tomorrow after it is updated my last cell with value in column D:G might be 10. How can I tell the macro to look for the last cell with value in columns D:G and drag those cells down until they match the cells with value of columns A:C??

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Drag down cells until last text cell

    The other code would work to. But is this what you want?

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-08-2012
    Location
    Mexico
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Drag down cells until last text cell

    Thanks a lot Mike. Exactly what I needed. Worked out perfectly!

    Regards!!!

+ 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