+ Reply to Thread
Results 1 to 6 of 6

Macro to repeat filling in certain blank cells

  1. #1
    Registered User
    Join Date
    12-31-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    12

    Macro to repeat filling in certain blank cells

    Hello,

    I am trying to write a Macro that would do the following:

    If in column E, there is the name "Smith" and in the same row in column B the cell is blank, I want it to pre-fill with "X123"

    For many of these rows, column B is already filled correctly with "X123", correlating to the name "Smith" in column E, however, there a handful that are blank. I want a macro to repeat pre-filling these cells in column B, when they are found to be empty.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to repeat filling in certain blank cells

    Try this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    12-31-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Macro to repeat filling in certain blank cells

    Hello,

    Thanks for the response. I tested it, and when ran it just brings me to the end of the sheet.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Macro to repeat filling in certain blank cells

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to repeat filling in certain blank cells

    Quote Originally Posted by lora2014 View Post
    Hello,

    Thanks for the response. I tested it, and when ran it just brings me to the end of the sheet.
    Is Smith the exact value in column E (not John Smith, or Smithy, or "Smith " with a trailing space)?

  6. #6
    Registered User
    Join Date
    12-31-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Macro to repeat filling in certain blank cells

    I was reviewing it today, it actually has two parenthesis around the name. I made sure to copy and paste though everything perfectly, and put it in place of Smith, in the macro

+ 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. macro to cut first non zero cells to the first blank cells and repeat it
    By nasim12w in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2013, 10:54 AM
  2. filling in blank cells
    By nbaylot33 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-19-2011, 04:51 PM
  3. filling in blank cells with "0" upon condition macro
    By ad9051 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-06-2011, 09:17 PM
  4. Filling blank cells
    By JeffHarper in forum Excel General
    Replies: 1
    Last Post: 05-20-2009, 09:12 PM
  5. Filling in Blank Cells
    By Rebecca in forum Excel - New Users/Basics
    Replies: 11
    Last Post: 05-16-2005, 06:06 PM

Tags for this Thread

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