+ Reply to Thread
Results 1 to 10 of 10

Filling in blank cells in column

  1. #1
    Registered User
    Join Date
    10-19-2010
    Location
    Arlington, WA
    MS-Off Ver
    Excel 2013
    Posts
    40

    Filling in blank cells in column

    I have this worksheet that comes from SQL that requires a macro to manipulate. In column B, I have a list of names (always starting in B5 but the last name in the list will always vary), but there's a varied number of blanks between the names. I'm looking to fill in those blanks, all the way down to the last row in which there is data in column D.

    Here is what I have in my macro so far:

    Please Login or Register  to view this content.
    this used to work just fine. However, something about the SQL report changed (I can't figure out what that is) and it no longer fills in the blanks in the column. Everything is in the same place that it should be in the report, so everything *should* be matching up. But the macro just skips over this step. Does anyone have a better solution on how to do this?

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

    Re: Filling in blank cells in column

    The cells are not longer "Blanks" to VBA, but may be to your eyes.
    You can easily do a simple test:
    Highlight (Select the range)
    CRTL plus G
    Go to special then
    Select blank
    and see if blank cells are selected or highlighted.

  3. #3
    Registered User
    Join Date
    10-19-2010
    Location
    Arlington, WA
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Filling in blank cells in column

    Yes, that is it. Okay, looks like I'll have to add in a find/replace into the macro to turn those back all into blanks. Thank you!

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

    Re: Filling in blank cells in column

    Adam,
    What I meant was if you have what appears to be blank cells, but the code does not find these blanks cells, it means these cells are not blank(At least to VBA). This usually happens when you have imported data in to excel.

  5. #5
    Registered User
    Join Date
    10-19-2010
    Location
    Arlington, WA
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Filling in blank cells in column

    Right, they're now showin up as not being blank cells. Is there a way to fix this other than doing a find/replace to turn them into blank cells for VBA's sake?

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

    Re: Filling in blank cells in column

    Yes, if you could attach the sample to see the data type.

  7. #7
    Registered User
    Join Date
    10-19-2010
    Location
    Arlington, WA
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Filling in blank cells in column

    Here it is. This is the report after the macro has been run. I had to hide the data for security reasons but other than that, this is pretty much what it looks like now once the macro runs.
    Attached Files Attached Files

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

    Re: Filling in blank cells in column

    Try the attached.
    Attached Files Attached Files

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

    Re: Filling in blank cells in column

    Amended code in module 1.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-19-2010
    Location
    Arlington, WA
    MS-Off Ver
    Excel 2013
    Posts
    40

    Re: Filling in blank cells in column

    Yes!!!! That works perfectly! Thank you thank you thank you

+ 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. Filling next blank cell in 5th column
    By dobbs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-17-2013, 03:04 AM
  2. Filling blank cells based on neighbouring column
    By ppataki in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-02-2009, 06:28 AM
  3. Filling Blank Cells
    By Mary Mayo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2006, 12:15 PM
  4. [SOLVED] Filling Blank Cells
    By Pankaj in forum Excel General
    Replies: 3
    Last Post: 06-02-2005, 04:05 PM
  5. Filling in Blank Cells
    By Rebecca in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 05-16-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