+ Reply to Thread
Results 1 to 6 of 6

VBA Macro to eliminate cells with a blank value

  1. #1
    Registered User
    Join Date
    01-24-2012
    Location
    A, A
    MS-Off Ver
    Excel 2010
    Posts
    12

    VBA Macro to eliminate cells with a blank value

    I'm looking at Chip Pearson's VBA code to eliminate blank cells (copied below) and realise that this will not work with cells that have a " " value. Is there any way to modify this so that it will return values from a list containing those " " values?

    Please Login or Register  to view this content.
    Last edited by paulxl; 01-24-2012 at 05:09 PM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: VBA Macro to eliminate cells with a blank value

    Hi paulxl
    Welcome to the Forum.
    Please wrap your code in Code Tags as per Forum Requirements.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: VBA Macro to eliminate cells with a blank value

    Try replacing..

    Please Login or Register  to view this content.
    with

    Please Login or Register  to view this content.
    Martin

  4. #4
    Registered User
    Join Date
    01-24-2012
    Location
    A, A
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: VBA Macro to eliminate cells with a blank value

    Martin

    This will pick up the first non " " value in the range but then repeats that value instead of ignoring the next range of " " values and picking up the rest of the real values.

    eg. If my data range comprises " ", " ", 34h, " ", " ", " ", 72h, " ", 104h...... I just get a " " in the first cell which I can live with then 34h in every cell thereafter when I need to return 34h, 72h,104h........

    Paul

  5. #5
    Registered User
    Join Date
    01-24-2012
    Location
    A, A
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: VBA Macro to eliminate cells with a blank value

    Martin

    This will pick up the first non " " value in the range but then repeats that value instead of ignoring the next range of " " values and picking up the rest of the real values.

    eg. If my data range comprises " ", " ", 34h, " ", " ", " ", 72h, " ", 104h...... I just get a " " in the first cell which I can live with then 34h in every cell thereafter when I need to return 34h, 72h,104h........

    Paul
    Last edited by paulxl; 01-26-2012 at 09:18 AM.

  6. #6
    Registered User
    Join Date
    01-24-2012
    Location
    A, A
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: VBA Macro to eliminate cells with a blank value

    Can anybody help me with this? I'm sure the answer is obvious but I just can't see it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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