+ Reply to Thread
Results 1 to 13 of 13

Count number of blanks across several columns

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Count number of blanks across several columns

    Hi all, thanks for taking a look at this problem that's stumping me.

    On the spreadsheet attached spreadsheet, there are two tabs - the 'Data' tab contains the table of raw data, where each row represents a Class # as displayed in column A, and then each following column displays data for each class.

    In the 'Formulas' tab, I want to track the number of blanks that occurred in columns D:G of the 'Data' table for each class. Hopefully this will be clear by looking at the example, but if not, let me know.

    Thank you!!!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,293

    Re: Count number of blanks across several columns

    =COUNTIF(range;"")

    Try this
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Count number of blanks across several columns

    B2:

    =COUNTBLANK(OFFSET(Data!$D1:$G1,MATCH(Formulas!B1,Data!$A2:$A15,0),0))

    And copy over
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Count number of blanks across several columns

    Thanks both for your help with this, but I was hoping to find a formula that could look up the corresponding row in the data tab if the actual row number changes. does that make sense?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Count number of blanks across several columns

    Try this, copied across...
    =COUNTBLANK(OFFSET(Data!$A$1,Formulas!B$1,1,,COUNTA(Data!$B$1:$G$1)))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Count number of blanks across several columns

    This should count the blanks given the row number. Enter in B2 and copy across as far as necessary.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 11-19-2013 at 03:36 PM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Count number of blanks across several columns

    Thanks to all of you for your help, but I'm going to continue to troubleshoot this. I wasn't clear enough in what I required, and my example was too simple I believe

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Count number of blanks across several columns

    Thank you for the feedback.

    Good luck with your project.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Count number of blanks across several columns

    thanks for the feedback

    Dont give up so easy, perhaps if you explained more, we could help

  10. #10
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Count number of blanks across several columns

    FDibbins, thanks to your message, and my stubbornness, I'll throw this back out there with a new example that better illustrates my problem... See the attahced.

    In the 'Missing Data' tab, I want to use the ID #s as a reference to find the corresponding row in the 'Data' tab, and in that row, count the number of blanks from column D to G.

    Thanks to all of you for the great suggestions.
    Attached Files Attached Files

  11. #11
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Count number of blanks across several columns

    Unless I'm crazy, I think that's what my original formula does. Adapted to your new example:

    =COUNTBLANK(OFFSET(Data!$D1:$G1,MATCH(B$1,Data!$A2:$A15,0),0))

    This takes range D1:G1 and offsets it by the row that matches the ID# to the list of IDs.

    In this case, the formula evaluates to =COUNTBLANK(Data!D15:G15)

    countblanks offset.xlsx


    Note: I might be crazy.

  12. #12
    Registered User
    Join Date
    04-16-2013
    Location
    Boston, Massachusetts
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: Count number of blanks across several columns

    Jokes on me, I'm the crazy one my friend, you're totally right... IT just took me three more cups of coffee to realize it. Thank you!

  13. #13
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Count number of blanks across several columns

    OK my previous suggestion was almost there, try this, copied across...
    =COUNTBLANK(OFFSET(Data!$A$1,MATCH(B$1,Data!$A$2:$A$15,0),1,,COUNTA(Data!$B$1:$G$1)))

    Edit: OK seems we were there already, see, told you to keep trying

+ 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: 1
    Last Post: 02-18-2013, 01:46 AM
  2. count number of Simultaneous blanks
    By rinks_84 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-12-2012, 05:35 PM
  3. Count the total number of rows in a column, with blanks included
    By jblumGRT in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2009, 06:55 PM
  4. compare columns and count number of matching columns
    By san000 in forum Excel General
    Replies: 1
    Last Post: 07-15-2009, 10:31 PM
  5. number columns skip blanks
    By wsk in forum Excel General
    Replies: 4
    Last Post: 05-11-2006, 10:10 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