+ Reply to Thread
Results 1 to 7 of 7

countif left cells are blank

  1. #1
    Registered User
    Join Date
    05-19-2014
    MS-Off Ver
    Office 2014
    Posts
    13

    countif left cells are blank

    I'm trying to figure out how to set up a formula that would count the number of numbers in a column, only if the cells before those cells are blank. In plain English: total the number of occurences in each column, provided the value in cellrow is the first occurence in that row starting at column A. E.G


    A B C D
    John x x
    Dave x x
    Kyle x x
    Bob x x
    Count would return under Column A, 1; under Column B, 1; (because row John has a value in AJohn it is ignored), under Column C, 2; under Column D, 0.
    Last edited by Apexeon; 05-20-2014 at 05:14 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,739

    Re: countif left cells are blank

    What version of Excel are you using? (Also, update your profile to indicate this.)
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-19-2014
    MS-Off Ver
    Office 2014
    Posts
    13

    Re: countif left cells are blank

    Office 2014

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,739

    Re: countif left cells are blank

    Here is a simple implementation that requires a non-blank cell immediately to the left of the A. If your situation is more complicated than your example then you might need a more complicated solution.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-19-2014
    MS-Off Ver
    Office 2014
    Posts
    13

    Re: countif left cells are blank

    Quote Originally Posted by 6StringJazzer View Post
    Here is a simple implementation that requires a non-blank cell immediately to the left of the A. If your situation is more complicated than your example then you might need a more complicated solution.
    This solution works for a small dataset, but for, say 100 columns, it would take too long to reiterate the formula to add new columns

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,739

    Re: countif left cells are blank

    Can you give a more complete description of your actual situation? All I had to go on was your example. How many rows, how many columns, what data is in the cells?

  7. #7
    Registered User
    Join Date
    05-19-2014
    MS-Off Ver
    Office 2014
    Posts
    13

    Re: countif left cells are blank

    Quote Originally Posted by 6StringJazzer View Post
    Can you give a more complete description of your actual situation? All I had to go on was your example. How many rows, how many columns, what data is in the cells?
    Very much what I'm showing, but 36 rows and 55 columns. Although I have a number rather than x, as a marker. I also have the first instance in that row highlighted red.

+ 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: 2
    Last Post: 11-22-2013, 01:07 PM
  2. [SOLVED] COUNTIF over a range of cells which has a LEFT function in the condition
    By Barnapkin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-28-2013, 04:40 PM
  3. [SOLVED] merging cells if cell either to the right or left is blank
    By liz5818 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2013, 03:26 PM
  4. VBA to delete cells that are blank and 0, move to left
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2011, 11:07 AM
  5. Validating cells left blank
    By chris100 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2005, 01:39 PM

Tags for this Thread

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