+ Reply to Thread
Results 1 to 3 of 3

Counting blanks between first and last most variable in array

  1. #1
    Registered User
    Join Date
    06-04-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Counting blanks between first and last most variable in array

    I have tested multiple codes and come to no solution. I am trying to create a formula to count populated and unpopulated cells between the first most variable and last most variable. I'll type it in CSV format to help differentiate. The key is that the first variable can be in column C, F, M, etc...it floats as well as the last variable.

    ,,,1,,,2,3,,4 (total of 10 columns). I want to return the result of 7. Whereby counting the 4 cells with 1, 2, 3 and 4 and also the blanks between 1 and 2, and 3 and 4. I've tried Index/match, ifblank, not(ifblank), etc to no avail

    I tried to find the first variable and was going to affect the array as such. did not work
    This brings and answer of 1 - =INDEX(D8:M8,MATCH(1,IF(D8:M8<>0,IF(D8:M8<>"",1)),0))

    Counta won't work since it will count all the cells before the initial variable
    I've tried =match to ID the first variable, then subtract total columns from first instance but getting last variable is key.

    I am lost in trying to figure this one out.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Counting blanks between first and last most variable in array

    hi draconius. maybe:
    =LOOKUP(2,1/(A8:M8<>""),COLUMN(A8:M8))-SUMPRODUCT(MIN(1E+100*(A8:M8="")+COLUMN(A8:M8)))+1

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    06-04-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    19

    Re: Counting blanks between first and last most variable in array

    Thank you Benishiryo! That forumla worked PERFECTLY!

+ 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. Counting Non Blanks & Blanks Records
    By sathishkm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-16-2014, 03:29 PM
  2. Create an array based off values in another array - exclude blanks
    By clifton1230 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2013, 05:35 PM
  3. Counting zeros in an array based on variable dates
    By bhenderson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-09-2012, 12:40 PM
  4. Counting non blanks
    By khalid79m in forum Excel General
    Replies: 2
    Last Post: 07-12-2007, 09:16 AM
  5. Counting Blanks
    By T De Villiers in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-23-2005, 09:34 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