+ Reply to Thread
Results 1 to 12 of 12

Fill/Copy Down Blank Cells Issue

  1. #1
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    749

    Fill/Copy Down Blank Cells Issue

    I'm trying to copy down blank cells based on the value above it. But I'm not certain how to handle the last item to fill down the blanks for the range selected.

    This is the basic code which works except for copying the last item. I think I need to somehow include an 'end' of the range?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    Option Explicit

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    749

    Re: Fill/Copy Down Blank Cells Issue

    Thanks AB33.

    But that does the same thing. I am selecting cells below the last Non-Blank cell. Example if you had items in Cells A1, A10, and A20. And if you selected the range from A1 to A30, those last to rows/cells do not fill down.

    I think you almost may need to add something to below your selected range, ie, A31 then fill down, and then deleted whatever added to cell A31?

    Thats just made up example of cells and ranges. Just not sure if that is best way to fill in the blanks after the last item in the selected range.

  4. #4
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    Assuming the data are in column A.

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    749

    Re: Fill/Copy Down Blank Cells Issue

    Same Result. Doesn't copy that last items info down the blank cells selected.

  6. #6
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    It does on my sample. Please attach your sample.

  7. #7
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    749

    Re: Fill/Copy Down Blank Cells Issue

    Seems strange it works for you.

    This is in Office/Excel 2013.
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    Only loop (back-wards) could work. You do not have cells above, so the code will not find any cell to fill in.

  9. #9
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    You need to select the range before you run the attached code. As you can see sheet2, it works
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    749

    Re: Fill/Copy Down Blank Cells Issue

    Ah ok. So currently, even with the the original code. If you select it from bottom to top, it will see the first cell selected as the active cell and copy blanks down to that spot.

    I know my user's won't think to do that so wonder if there in alternative approach. Is there a way to get the bottom cell of a selected range?

  11. #11
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    How does any code know where the last cell end unless you have some kind of pointers?
    The last non empty cell could be 15,20 or 30 after some blank cells. You need to indicate where the cell start/end after a blank ends.
    One way would be to select the desired range. You could also use some kind of data input inbox, but this still suffers the same as selection.

  12. #12
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,122

    Re: Fill/Copy Down Blank Cells Issue

    The code you have even with selection will not fill in the blanks while my last code does

+ 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] Fill/Copy Down Blank Cells Issue
    By ptmuldoon in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2015, 08:36 AM
  2. [SOLVED] Macro to fill blank cells in column A based on non-blank cells
    By ktalamantez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-28-2014, 02:47 PM
  3. Fill blank cells with data directly above that blank cell
    By gibson2503 in forum Excel General
    Replies: 3
    Last Post: 06-05-2013, 10:07 AM
  4. How to color-fill blank cells, then once data is entered cell is no-fill
    By hatemail13 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 07:57 PM
  5. [SOLVED] Copy cells to fill in blank fields
    By RevJeff in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-13-2012, 11:43 AM
  6. macro copy fill the in-between blank rows
    By foxxkat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-12-2005, 05:53 AM
  7. Copy down - special to fill only the blank cells
    By Mike in forum Excel General
    Replies: 3
    Last Post: 04-18-2005, 06:06 PM

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