+ Reply to Thread
Results 1 to 5 of 5

Count blank cells right to left where range is based on column header

  1. #1
    Registered User
    Join Date
    11-15-2016
    Location
    Utah, USA
    MS-Off Ver
    2016
    Posts
    1

    Count blank cells right to left where range is based on column header

    example.jpg

    I run a large number of programs where I receive deliveries and manually enter the number delivered into the row of the program and the fixed date in the header.

    I need a function (or VBA) that will update automatically to locate the column header with today's date and in the corresponding row count the number of blank cells (counting backwards) until it reaches a cell with a value other than blank.

    Because I run hundreds of programs, it is easy to miss when I have not received a delivery in a long period of time. The image attached should provide a more clear example of what I am looking to accomplish.
    Attached Images Attached Images
    Last edited by makmood; 11-15-2016 at 05:52 PM.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count blank cells right to left where range is based on column header

    Many members are unable to see images in the *.png format due to forum compatibility issues with some browsers.

    If you need to post an image post it in the *.jpg format.

    Even better than posting images... post a SMALL sample file. That way we can test solutions directly in the file with the relevant data.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,452

    Re: Count blank cells right to left where range is based on column header

    With today's date in A1 and 'Days Since Last Delivery' in column A try array entering this formula in A3 and fill down until you get blanks. If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count blank cells right to left where range is based on column header

    MATCH(2,1/ISNUMBER(B3:P3),1)
    You can shorten that a bit...

    MATCH(1000,B3:P3)

    Or...

    MATCH(1E100,B3:P3)

    Then, just a normal Enter will do.

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,452

    Re: Count blank cells right to left where range is based on column header

    @ Tony Valko

    Yup!

    Thanks for that.

    Reciprocating has become a habit.

+ 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 non blank cells if values in range in another column are between two numbers
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2015, 04:01 PM
  2. [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
  3. Replies: 2
    Last Post: 11-22-2013, 01:07 PM
  4. Replies: 4
    Last Post: 09-12-2013, 11:32 PM
  5. Replies: 5
    Last Post: 10-14-2012, 07:02 PM
  6. Replies: 2
    Last Post: 10-13-2012, 03:30 AM
  7. Replies: 6
    Last Post: 07-26-2012, 06:34 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