+ Reply to Thread
Results 1 to 3 of 3

VBA code finds blanks, but how to write VBA to ignore non blanks?

  1. #1
    Registered User
    Join Date
    03-06-2014
    Location
    Valparaiso, FL
    MS-Off Ver
    Excel 2013
    Posts
    73

    VBA code finds blanks, but how to write VBA to ignore non blanks?

    Ok Gurus, Iím crying uncle. Iíve been trying to figure this out and am still stuck.

    I have a simple sheet that paste data into. Then I use a button to look at columns A & B to see if there are any blank cells. Then if there is a blank cell it will look to the cell directly above it and copy the data into it. This works perfectly. However if there are no blank cells, how can I write to code to ignore the instructions and move forward? Iíve tried ďOn error resume nextĒ but I think my placement is off, perhaps the way I have the code now is not structured properly. I would greatly appreciate any guidance. This forum has always been such a fantastic resource and I am so grateful for the kindness I find here. Thank you!

    Iíve uploaded a sample sheet, with two tabs. One has data with blanks and one without. Thank you again for taking a look!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,445

    Re: VBA code finds blanks, but how to write VBA to ignore non blanks?

    No, it is the right code. If the code finds no blanks, it does not error.

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,379

    Re: VBA code finds blanks, but how to write VBA to ignore non blanks?

    Please Login or Register  to view this content.
    Kind regards
    Leo

+ 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. Replies: 5
    Last Post: 06-03-2021, 12:07 AM
  2. Ignore blanks in Compile workbooks code
    By MichaelHopkins in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-20-2015, 09:42 AM
  3. [SOLVED] Lookup but ignore blanks
    By jayherring86 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-04-2015, 05:58 PM
  4. VBA Code Needed - Move Data/Ignore Blanks/Data is Moved to Specific Area
    By kbarnes04 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-22-2014, 03:30 PM
  5. [SOLVED] MIN/MAX IF To Ignore Blanks
    By splendidus in forum Excel General
    Replies: 2
    Last Post: 07-04-2012, 04:00 PM
  6. VB code help, ignore blanks/specific
    By ad9051 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-08-2011, 04:38 PM
  7. Loop that finds blanks, then subtotals values into different column
    By Bevy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-24-2006, 11:45 AM

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