+ Reply to Thread
Results 1 to 8 of 8

Only filling in blanks

  1. #1
    Registered User
    Join Date
    05-09-2016
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    7

    Post Only filling in blanks

    Hi All,

    In short, I'm trying to pull in values from Column B to Column A only if Cells in Column A are blank. If cells in Column A are populated, they should not be changed. Also, Column A values should be in "general" format.

    Does any one know how this would be expressed in VBA code?

    Thanks
    2ndLunch

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Only filling in blanks

    You can filter to accomplish that, or use VBA to apply said filter.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,033

    Re: Only filling in blanks

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    05-09-2016
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    7
    Quote Originally Posted by mikeTRON View Post
    You can filter to accomplish that, or use VBA to apply said filter.
    I've been filtering and tried recording a macro to filter but the problem arises when the data changes from day to day. For example, the filter macro will only look at certain rows. When those rows change the next day, the recorded macro will only look at those recorded rows. This is one step and longer process so I was hoping there was a VBA code solution.

    Thx
    2ndLunch

  5. #5
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Only filling in blanks

    Quote Originally Posted by 2ndLunch View Post
    I've been filtering and tried recording a macro to filter but the problem arises when the data changes from day to day. For example, the filter macro will only look at certain rows. When those rows change the next day, the recorded macro will only look at those recorded rows. This is one step and longer process so I was hoping there was a VBA code solution.

    Thx
    2ndLunch
    It sounds as if your macro works but you have another issue, how to make it work for a dataset with a different row count each time.
    Luckily this is a very common problem and easy to solve.
    http://www.thespreadsheetguru.com/bl...lumn-using-vba

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    24,033

    Re: Only filling in blanks

    Have you tried the Macro I provided you? It worked when I tested on my PC based upon your requirements.

  7. #7
    Registered User
    Join Date
    05-09-2016
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    7

    Re: Only filling in blanks

    Thx Alan, this worked perfectly!

  8. #8
    Registered User
    Join Date
    05-09-2016
    Location
    Boston
    MS-Off Ver
    2013
    Posts
    7

    Re: Only filling in blanks

    Awesome, thank you. Very useful

+ 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. Having trouble filling in blanks in data
    By sedrite in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-07-2015, 02:00 PM
  2. Filling in blanks with what's above
    By AdamBee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2013, 06:12 AM
  3. Filling in rhe blanks using info from next column
    By khoshmaze in forum Excel General
    Replies: 3
    Last Post: 11-21-2012, 10:19 AM
  4. Filling in the Blanks
    By stumbler555 in forum Excel General
    Replies: 2
    Last Post: 11-01-2012, 02:15 PM
  5. Matching columns and filling blanks
    By losty in forum Excel General
    Replies: 2
    Last Post: 07-27-2010, 02:50 PM
  6. Filling in the blanks
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-27-2010, 01:00 PM
  7. need help filling in blanks
    By yellowbus in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-17-2008, 01:39 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