+ Reply to Thread
Results 1 to 11 of 11

Need to count blank cells in a column, with a twist

  1. #1
    Registered User
    Join Date
    01-24-2014
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Need to count blank cells in a column, with a twist

    Hello, and thank you in advance for any help you can offer. I have a spreadsheet that has 36 columns and 6000+ rows. Each column has a mix of blanks and content, which is an X. See example of the pattern below, column A. I want to run the COUNTBLANK function through the entire column A so that it assigns a value in column B, next to the content it relates to. Line B4, B9, and B11 would have results, in the example below. I want to be able to apply a formula the entire worksheet, all 36 content columns, and over 6000 rows, so that I can obtain the results quickly by filling down, across, etc. I suspect a loop might be in order, but I have no clue. Currently, I have to run the COUNTBLANK between one X and another, repeating that tediously over and over again. I would be forever grateful for help with this. -- Mike

    ---A----------------------------B
    1 X
    2 blank
    3 blank
    4 X--------------------Result is the number of blanks between this X and the X above it (which would be 2)
    5 Blank
    6 Blank
    7 Blank
    8 Blank
    9 X--------------------Result is the number of blanks between this X and the X above it (which would be 4)
    10 Blank
    11 X-------------------Result is the number of blanks between this X and the X above it (which would be 1)
    12 Blank

  2. #2
    Registered User
    Join Date
    06-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    51

    Re: Need to count blank cells in a column, with a twist

    Hi mmahoney

    I think this might be what you are looking for, but your request is slightly confusing.



    Please Login or Register  to view this content.
    Last edited by Rschwar23; 01-24-2014 at 07:30 PM.

  3. #3
    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
    53,047

    Re: Need to count blank cells in a column, with a twist

    Hi and welcome to the forum

    I have a spreadsheet that has 36 columns
    Do you want the same data shown in all the other columns? What do you want shown? Perhaps it would help if you provided a few samples of your expected outcome?
    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

  4. #4
    Registered User
    Join Date
    01-24-2014
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need to count blank cells in a column, with a twist

    Thanks, Rschwar23. I tried out that formula but I received error messages. Sorry for anything that was confusing. To make it simple, I attached a screen capture image of the worksheet. Basically, I want an easy way to quickly count the blanks between the X's and show the results.

    fill in the blanks.jpg

  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
    53,047

    Re: Need to count blank cells in a column, with a twist

    Please do not upload a picture of your file...rather, upload a sample of your workbook, showing what data you are working with, a few samples of your expected outcome is (manually entered is ok) and how you arrived at that. (exclude sensitive info). Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you Also, not all members can upload picture files (Company firewalls and stuff)

  6. #6
    Registered User
    Join Date
    01-24-2014
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need to count blank cells in a column, with a twist

    Attached now is a sample. The desired results are highlighted in yellow. The number is the amount of blank spaces between the X and the X above tthat X, as you go down the column.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Need to count blank cells in a column, with a twist

    Using the file you supplied, put this formula into Cell B2

    Please Login or Register  to view this content.
    you can then copy it down all rows, and also copy it across to the other columns you need

    but with the amount of data you have from previous draws, it might be worth looking at the method you use to populate this sheet from the historical data you have of all Fantasy 5 draws. So instead of it placing the X it could put the number you wanted instead (as in number of draws the number was last seen).

  8. #8
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Need to count blank cells in a column, with a twist

    Try this:

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    01-25-2014
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    434

    Re: Need to count blank cells in a column, with a twist

    I just did some further tests before closing it down, and found there is a problem with the original formula I posted
    It wasn't coping with balls for the first draw in your data, i.e. on row 2

    This formula now does a check for the first row of data

    Please Login or Register  to view this content.
    Again, as long as you enter this formula into cell B2 initially, you will be able to copy it down and across without having to make any adjustments to it


    Here is a sample of about the first 50 draws for balls 1 to 10

    1 1B 2 2B 3 3B 4 4B 5 5B 6 6B 7 7B 8 8B 9 9B 10 10B
    X 0
    X 2 X 2
    X 3 X 3 X 3
    X 4
    X 1 X 2
    X 0 X 5
    X 4 X 0
    X 8 X 0 X 3
    X 3
    X 2 X 3 X 0 X 2
    X 12
    X 4
    X 10
    X 1 X 9
    X 12 X 4 X 4
    X 0
    X 5 X 2 X 18
    X 7
    X 4 X 3
    X 2
    X 10 X 0
    X 0
    X 10 X 4 X 8
    X 6 X 7 X 0
    X 1
    X 7 X 0 X 1
    X 5 X 2
    X 4
    X 2
    X 10
    X 5
    X 3 X 6
    X 6
    X 19 X 3
    X 5
    X 11 X 13 X 2
    X 0 X 12 X 4
    X 3
    X 1
    X 2 X 4
    X 4 X 28
    X 1
    X 11 X 0

  10. #10
    Valued Forum Contributor
    Join Date
    03-21-2013
    Location
    cyberia
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: Need to count blank cells in a column, with a twist

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-24-2014
    Location
    Florida, USA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need to count blank cells in a column, with a twist

    THIRTYTWO - I got the first one to work before I saw that you did some further testing. I was able to get the data I needed after some tweaking. Thank you so much! I really appreciate it.
    Last edited by mmahoney; 01-26-2014 at 02:44 PM. Reason: Add credit to poster

+ 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] count blank cells in one column based on date in different column
    By IreneADS in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2014, 09:58 AM
  2. Count number of cells in column per month, ignore blank cells
    By lamdl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-13-2014, 08:50 PM
  3. Replies: 2
    Last Post: 10-04-2012, 03:19 PM
  4. Replies: 5
    Last Post: 08-05-2009, 02:43 PM
  5. [SOLVED] fill blank cells with twist
    By fatturtle in forum Excel General
    Replies: 0
    Last Post: 04-27-2006, 07:50 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