+ Reply to Thread
Results 1 to 4 of 4

find a range of empty cells within a range of cells

  1. #1
    Forum Contributor
    Join Date
    06-06-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    129

    Post find a range of empty cells within a range of cells

    Hi all. I need help trying to modify some code I am using to limit a range of cells being sorted to exclude the empty cells in the range being sorted. The range being sorted is AG5:AG16 but during the sort it puts counted data in cells that are blank. I am not sure why this is happening but I think if I can limit the sort to only the cells that have an ID number in them that should fix it. I don't know how to get this code to only put data into the cells that have the ID numbers in them as the number of people working on a given day changes. I list them by their ID number in range of AG5:AG16 but there are only 3 permanent listed in cells AG5:AG7 and the rest are entered as needed up AG16. I know how to find the number of rows used for the sheet but not sure how to find the number of empty cells within a range of AG5:AG16. All help is greatly appreciated!

    Here is the code I am using now.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: find a range of empty cells within a range of cells

    I think this is what you want

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Forum Contributor
    Join Date
    06-06-2017
    Location
    Phoenix, AZ
    MS-Off Ver
    2013
    Posts
    129

    Re: find a range of empty cells within a range of cells

    Boy do I feel dumb right now! Thanks so much I had it in my head that I needed another set of code to do that!!
    KISS "Keep It Simple Stupid"
    Thanks so much works fine!

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: find a range of empty cells within a range of cells

    Quote Originally Posted by COURTTROOPER View Post
    Boy do I feel dumb right now! Thanks so much I had it in my head that I needed another set of code to do that!!
    KISS "Keep It Simple Stupid"
    Thanks so much works fine!
    You're welcome,
    regards, JLG

+ 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] How do I find the first empty cell in a range of cells in a column
    By Nirmall in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-12-2015, 01:20 PM
  2. VBA code to find max value in unsorted range with empty cells between
    By tnkcoll in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-26-2015, 05:22 PM
  3. how to copy a range of cells, paste them and then find next empty cell
    By comp23 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-01-2013, 03:34 PM
  4. [SOLVED] Find empty cells in a range and insert formula in adjacent cell
    By macronovice1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-25-2012, 03:06 PM
  5. [SOLVED] find unique values in a range that contains text and empty cells
    By bombicci in forum Excel General
    Replies: 4
    Last Post: 07-04-2012, 09:17 AM
  6. shift range of cells to left if find the range of empty do while
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-20-2012, 09:25 AM
  7. Find empty cells within a range and found run program
    By aprathore in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2011, 09:16 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