+ Reply to Thread
Results 1 to 12 of 12

CountBlank cells skipping Columns

  1. #1
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    CountBlank cells skipping Columns

    Hi All

    I have been trying to find a solution to this problem for a while now and just can't get it...This code code counts blank cells in a range...
    Please Login or Register  to view this content.
    How can i amend the code to only count blanks in certain columns i.e B:D,H,J:K
    I tried this but only allows for two entries?
    Please Login or Register  to view this content.
    pertains to a post currently active which is not getting any joy from other members...https://www.excelforum.com/excel-pro...ml#post4641633
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    Anyone out there able to assist...Just can't figure this out...
    Last edited by sintek; 04-29-2017 at 01:40 AM.

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    Ended up having to set individual ranges and add them together....Any other solutions...
    Please Login or Register  to view this content.
    Last edited by sintek; 04-29-2017 at 02:12 AM. Reason: Added a possible solution

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    Anyone out there able to offer an alternate solution?

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,420

    Re: CountBlank cells skipping Columns

    I would suggest you have a look at Union and/or Intersect, maybe a combination of both.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    Thanks Trevor

    Will look into it and see if i can come up with code to replace above...

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    Nope, Right over my head...Just don't get it....

  8. #8
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: CountBlank cells skipping Columns

    Hi,

    You might use one of these to create a multiple cell range
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    However, Countblank will not work with a discontiguous range so your current solution is fine. (You might also look at specialcells.)
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    thanks xlnitwit

    just what i was trying to understand.

  10. #10
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: CountBlank cells skipping Columns

    Unlike other Excel functions like AVERAGE(), COUNTA(), the COUNTBLANK() function does not support paramarray parameter (only one parameter is allowed), this will make the function cannot accept separated (union of) ranges.
    https://support.office.com/en-us/art...6-24af6bd3ac22
    https://support.office.com/en-us/art...2-53f3219e2509
    https://support.office.com/en-us/art...b-8f33eb960cf6

    As a work around, you can make an UDF that accepts paramarray parameters, and summing the CountBlank() result for each parameter, like this :
    Please Login or Register  to view this content.
    Attached Files Attached Files
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  11. #11
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,199

    Re: CountBlank cells skipping Columns

    That's excellent karedog....thanks

  12. #12
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: CountBlank cells skipping Columns

    You are welcome, thanks for the reps.

    Regards

+ 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] Sum skipping columns
    By Steve in forum Excel General
    Replies: 8
    Last Post: 10-17-2021, 11:36 PM
  2. copy values from columns to rows while skipping empty columns...
    By EricCy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2016, 06:20 AM
  3. Replies: 1
    Last Post: 05-21-2014, 04:30 PM
  4. Countblank - Need code to update countblank numbers as data is updated
    By agregory12 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2013, 01:49 AM
  5. IF(MOD) for skipping columns
    By rhudgins in forum Excel General
    Replies: 5
    Last Post: 07-31-2010, 02:16 AM
  6. [SOLVED] Skipping Columns
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-31-2006, 06:08 PM
  7. skipping columns
    By Wazooli in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-19-2005, 02: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