+ Reply to Thread
Results 1 to 7 of 7

If any cell in column contains value then fill blank cells in column with !

  1. #1
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    If any cell in column contains value then fill blank cells in column with !

    Hi everyone,

    I have a very messy data sheet I'm trying to clean up. I've done everything except the following:

    If any column in range A1:BB500 has at least one cell with a value in it, then all other blank cells in that column will have (fill) pasted into it. If there are no values in a column within that range, then nothing happens.

    Any ideas?

    Thanks!!

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: If any cell in column contains value then fill blank cells in column with !

    Maybe something like this?

    Please Login or Register  to view this content.
    I'm interested in starting a career working with VBA, if anyone knows of any opportunities!

  3. #3
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: If any cell in column contains value then fill blank cells in column with !

    Hi walrus,

    Thanks for code. I'm getting an error message that no cells were found. Error is at d.SpecialCells(4).Value = "(fill)"
    I've tried changing d.find("*") to d.find("") without success.

    Any ideas?

  4. #4
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: If any cell in column contains value then fill blank cells in column with !

    Ah, the error would be if there are no blank cells in a given column. SpecialCells(4) are the blank cells. You don't want to change the d.Find, that's the correct syntax.

    Try:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-29-2013
    Location
    Oshawa
    MS-Off Ver
    Excel 2010
    Posts
    660

    Re: If any cell in column contains value then fill blank cells in column with !

    Hi walrus,

    Thanks. I'm afraid I'm still getting the same error message on d.SpecialCells(4).Value = "(fill)". Again, if there is at least 1 cell in a column in the range that has a value, then all other blank cells in that same column have (fill) listed into them. If there is a column in the range that doesn't have any values then its ignored. It has to be based on column, no row. Thanks very much for your help thus far!

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: If any cell in column contains value then fill blank cells in column with !

    It is based on columns and it works as expected on the dummy sheet i created. Please post an example worksheet where the code is not working as expected so that i can troubleshoot your data set.

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

    Re: If any cell in column contains value then fill blank cells in column with !

    Maybe:

    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. [SOLVED] Fill blank cells in a column?
    By NicholasLag in forum Excel General
    Replies: 9
    Last Post: 08-21-2015, 05:30 AM
  2. [SOLVED] Fill blank cells in column with value in the column below blank cells
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-21-2015, 02:57 PM
  3. Fill Blank Cells in a Column with Formula
    By uberathlete in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2014, 03:29 PM
  4. [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
  5. Fill blank cells in column with value above
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-19-2012, 09:46 AM
  6. How to fill blank cells with different values in a column
    By intermine in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-05-2010, 12:43 AM
  7. how can i fill blank cells in column with abc while the right col.
    By khurram saddique in forum Excel General
    Replies: 2
    Last Post: 02-12-2005, 12: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