+ Reply to Thread
Results 1 to 10 of 10

Counting Blank Cells

Hybrid View

Larko Counting Blank Cells 04-27-2010, 06:16 AM
DonkeyOte Re: Counting Blank Cells 04-27-2010, 06:20 AM
Larko Re: Counting Blank Cells 04-27-2010, 06:27 AM
DonkeyOte Re: Counting Blank Cells 04-27-2010, 06:35 AM
Larko Re: Counting Blank Cells 04-27-2010, 06:49 AM
DonkeyOte Re: Counting Blank Cells 04-27-2010, 06:57 AM
Larko Re: Counting Blank Cells 04-27-2010, 07:18 AM
DonkeyOte Re: Counting Blank Cells 04-27-2010, 07:45 AM
Larko Re: Counting Blank Cells 04-27-2010, 07:56 AM
DonkeyOte Re: Counting Blank Cells 04-27-2010, 08:04 AM
  1. #1
    Registered User
    Join Date
    04-27-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    7

    Counting Blank Cells

    Hi All,
    I am trying to create a formula that counts blank cells in the next 7 cells in the row, however only counting up to the first non blank cell, eg -

    blank blank blank 1 1 blank blank

    Is currently returning 5, and I want it to return 3. I am currently using an if statement and countblank.

    Any help would be appreciated.
    Thanks
    Richard.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Blank Cells

    It would help if we had some ranges with which to reference and understood the non-blank data type consistency (always number, text etc)...
    Also are the blanks Nulls (formula) or true blanks ? (use of COUNTBLANK implies Nulls in use)

    Let's assume your values are in row 1

    =MATCH(TRUE,INDEX(1:1<>"",0),0)-1

    (where no non-blank/nulls exist an error will be returned - handle as nec.)

    If the formula is to reside in the same row as the values then adjust the ranges as nec. (ie to avoid circular references).

  3. #3
    Registered User
    Join Date
    04-27-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Counting Blank Cells

    =IF(Avaliability!F8=1,"",COUNTBLANK(Avaliability!G8:M8))

    Is the current formula. The blanks are completely empty cells, the populated cells are all 100%.

    Thanks
    Richard.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Blank Cells

    So to be clear - the 100% / blank range is Availability!F8:M8 and you're checking F8 first for obvious reasons (ie if 1 then result must be 0), is that correct ?

    If so, perhaps:

    =IF(Availability!F8=1,"",IF(COUNT(Availability!F8:M8),MATCH(1,Availability!F8:M8,0)-1,8))

  5. #5
    Registered User
    Join Date
    04-27-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Counting Blank Cells

    Yes, if the cell it is checking is 100% then I want a blank cell, if F8 is empty then i want it to go to G8 to see if that is empty, if so then it would go to H8, if that cell is populated then it would return 2. As there are two blank cells before a 100%

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Blank Cells

    Have you tested the suggestion ?

  7. #7
    Registered User
    Join Date
    04-27-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Counting Blank Cells

    Yes, it returned 8. Not sure why?

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Blank Cells

    If it's returning 8 then the implication is that there are no numbers in the range specified (ie COUNT of range returns 0) - are the 1's numbers or numbers stored as text ?

  9. #9
    Registered User
    Join Date
    04-27-2010
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Counting Blank Cells

    I see, so if I want to change that to 7 if all cells are empty then I just update the end of the formula? Excellent, thanks very much for your help.

  10. #10
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Blank Cells

    Yes.

    That was one of the reasons I wanted to know the purpose of Availability!F8
    ie that cell formed one of the 100%/nothing cells (as implied by your initial formula) then it followed that if F8:M8 were all blank (ie COUNT = 0) then there were 8 blanks in total and that should be the result

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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