+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : Count number of blank cells between two words

  1. #1
    Registered User
    Join Date
    01-27-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    18

    Count number of blank cells between two words

    Hi.. how do I go about counting the number of cells between two words?

    I have multiple words (e.g., DM, DG) arranged in a column and in chronological order (as below). How do I count the number of blank/empty only cells between two words (i.e., between the first DM and DG?

    Also how do I count all cells (with or without text) between DM and DG? Thanks v much.

    11-Nov-10
    29-Oct-10 DM
    30-Sep-10 RL
    31-Aug-10
    31-Jul-10 DG
    30-Jun-10
    31-May-10
    30-Apr-10 DM
    31-Mar-10
    Last edited by northerng; 01-27-2011 at 11:41 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Count number of blank cells between two words

    Try:

    =COUNTBLANK(INDEX($B$1:$B$9,MATCH("DM",$B$1:$B$9,0)):INDEX($B$1:$B$9,MATCH("DG",$B$1:$B$9,0)))

    and

    =MATCH("DG",$B$1:$B$9,0)-MATCH("DM",$B$1:$B$9,0)-1

    this gives number of cells between excluding those cells that contain the text... you can remove the -1 or change to +1 based on whether you want to include one or both cells containing search criteria.

    Of course, you can replace the "DG" and "DM" with cell references containing them.

    These formulas will look for 1st matches of each text string.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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