+ Reply to Thread
Results 1 to 7 of 7

Select rows with cells containing consecutive blanks

  1. #1
    Registered User
    Join Date
    08-21-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    Business 2019
    Posts
    3

    Select rows with cells containing consecutive blanks

    Hi All,

    I have created a large pivot table but need a macro to identify (and select) the rows in which there are two or more consecutive blank entries.

    I have identified the days in which a customer base will make a purchase, but want to see any gaps of two or more days. Example below:

    Highlight blanks.png

  2. #2
    Registered User
    Join Date
    08-09-2019
    Location
    Ha nam, Vietnam
    MS-Off Ver
    2010
    Posts
    13

    Re: Select rows with cells containing consecutive blanks

    hi,

    see attach file, make a Macro for sample.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-21-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    Business 2019
    Posts
    3

    Re: Select rows with cells containing consecutive blanks

    Hi tranhieu04,

    Thanks for this info! Can you please tell me how to change so this selects the entire rows that contain relevant cells, instead of highlighting?

    Also, will this macro translate to a much bigger data set (B2:BH3000)?

  4. #4
    Registered User
    Join Date
    08-09-2019
    Location
    Ha nam, Vietnam
    MS-Off Ver
    2010
    Posts
    13

    Re: Select rows with cells containing consecutive blanks

    See attach file for more detail.
    press ALT + F11 to show modul
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-21-2019
    Location
    Melbourne, Australia
    MS-Off Ver
    Business 2019
    Posts
    3

    Re: Select rows with cells containing consecutive blanks

    We are getting there! I have translated the macro to my workbook and changed the search parameters. Now all i need to do is change the highlight (interior colour) function to select the entire row that contains the cells.

    Does that make sense?

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Select rows with cells containing consecutive blanks

    My bad code not tested properly, posting deleted

    Alf
    Last edited by Alf; 08-22-2019 at 05:35 AM.

  7. #7
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Select rows with cells containing consecutive blanks

    Fixed it Suitable for a smaller range that you select with mouse for instance

    Please Login or Register  to view this content.
    Alf

+ 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: 7
    Last Post: 03-14-2019, 06:05 AM
  2. [SOLVED] Select entire Column of data even when there are blanks in some rows, xlDown
    By lougs7 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2018, 02:08 PM
  3. Select 15,000 rows that has some data and some blanks
    By storkhiw in forum Excel General
    Replies: 1
    Last Post: 02-22-2016, 03:12 PM
  4. Counting consecutive cells in a range with blanks and displaying a specific value
    By mvllanueva14 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-28-2014, 01:10 AM
  5. Select & Delete Random Consecutive Rows
    By carbonboywonder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2009, 05:28 AM
  6. Replies: 2
    Last Post: 09-15-2005, 08:05 PM
  7. Select non-consecutive cells for deletion
    By Mark in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-10-2005, 09:05 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