+ Reply to Thread
Results 1 to 6 of 6

Code to fill down 2 cells to last row

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Code to fill down 2 cells to last row

    Hi.
    How do I select 2 cells (i.e. Range("BA5:BA6").select) and have a code fill this down an excel sheet to the last row.
    Here's what I have but it doesn't work:
    Please Login or Register  to view this content.
    Any help is appreciated

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Code to fill down 2 cells to last row

    Maybe
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: Code to fill down 2 cells to last row

    Thank you.
    I changed "lrow" to LR.
    The code filled down BA5 but not BA6.
    How do I get these two cells filled down?
    If you were to manually do it you would select both cells, click on the black dot on the bottom right hand corner and fill down.

  4. #4
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: Code to fill down 2 cells to last row

    When I record the action this is what I got:
    Please Login or Register  to view this content.
    However I need that instead of the end of the range being "BA314" I would like for it to detect the last-row instead.

  5. #5
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Code to fill down 2 cells to last row

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Waterbury, CT
    MS-Off Ver
    Office 365
    Posts
    1,175

    Re: Code to fill down 2 cells to last row

    Thank you Solus, your answer worked

+ 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. Code to fill down cells
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-22-2014, 01:41 PM
  2. VBA code to fill blank cells with variable formula
    By Khen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2014, 08:24 AM
  3. Using VBA code to fill cells with colour
    By nav505 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-14-2013, 01:57 PM
  4. Using VBA code to fill cells with colour
    By nav505 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2013, 09:00 AM
  5. [SOLVED] Code is not making cells with no color filled. Can not apply NO FILL to spreadsheet.
    By Flowerski in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-01-2012, 08:35 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