+ Reply to Thread
Results 1 to 4 of 4

VBA to Fill Blanks Based on Specific Value

  1. #1
    Registered User
    Join Date
    11-28-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    73

    VBA to Fill Blanks Based on Specific Value

    Hello,

    In a macro I am trying to fill blanks in a column if a specific criteria/value matches in another column. Example... If the cell in column "H" is blank and column "G" contains "Acme" I want to fill the cell in "H" with a value "Error".

    I have researched but not found this specific issue.

    Thank you,

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: VBA to Fill Blanks Based on Specific Value

    Try

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Registered User
    Join Date
    11-28-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2010
    Posts
    73

    Re: VBA to Fill Blanks Based on Specific Value

    Perfect! Sometimes you need that extra push.

    Thank you!

  4. #4
    Registered User
    Join Date
    10-17-2018
    Location
    Woking, England
    MS-Off Ver
    2016
    Posts
    1

    Re: VBA to Fill Blanks Based on Specific Value

    Hi,

    I've finally found this thread after days of searching and I'm trying to do pretty much the exact same thing and the code you've provided works nicely.

    However, with mine, it works for about half the records, returning "Free" as it should, but then for the rest it comes back with #NA - any ideas why this may be?

    Also, I've got to do this for three separate columns... For example, if column J equals "Free" then all blank cells in columns I, L and M must be filled with "Free". What's the best way to do this?

    This is the code I'm using at the moment. Like I say, it works for about 50% of the records - what am I doing wrong? Any help is massively appreciated!

    Please Login or Register  to view this content.

+ 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. Fill in specific blanks with current date
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-15-2017, 03:17 PM
  2. Replies: 3
    Last Post: 04-05-2013, 01:56 PM
  3. Dynamic Auto-Fill Range based upon Specific number of rows
    By a333 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2013, 03:54 AM
  4. auto fill time based on a when a specific cell has data entered
    By b16dlg in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2012, 05:26 AM
  5. Macro to Fill Specific Rows and Columns with Color Based on Cell Value
    By MSmithson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2011, 09:45 PM
  6. Count column w/blanks & values based on specific date
    By nickelcell1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-30-2009, 04:08 PM
  7. [SOLVED] I am trying to color fill a cell based on specific criteria
    By jglen in forum Excel General
    Replies: 1
    Last Post: 05-27-2005, 01:05 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