+ Reply to Thread
Results 1 to 5 of 5

Countblanks with IF

  1. #1
    Registered User
    Join Date
    03-28-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    36

    Countblanks with IF

    Hi

    I'm looking to create a formula to count the number of blank weeks for individuals for the remaining fiscal year; however, I don't want to count blank cells if --
    1) They are exiting the company before the end of the fiscal year (it should stop counting at their contract end date only if the Column B status = "Leaver")
    2) They are joining part-way through the year (it should start counting at their contract start date)

    E1 - AD1: weekly dates remaining in fiscal year
    A2: Individual's Name
    B2: Status
    C2: Start Date
    D2: End Date


    I tried using the below formula, but it doesn't seem to be calculating properly, and I haven't found a way to wrap-in the start date --
    =countblank(E2:AD2)-if(B2,"Leaver",(AD1-D2)/7)

    Attached is a file of what it looks like, and column AE at the end is the expected result.


    Any help would be greatly appreciated!
    Attached Images Attached Images

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Countblanks with IF

    I can't read your example, but you should be able to do this with a COUNTIFS function - attach a sample Excel workbook so I can try it out before posting.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-28-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    36

    Re: Countblanks with IF

    Hi Pete,

    Here is an example workbook (red columns is the expected result)

    Cheers!
    Attached Files Attached Files

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Countblanks with IF

    Put this formula in cell AE2:

    =COUNTIFS(E2:AD2,"",$E$1:$AD$1,">="&C2,$E$1:$AD$1,"<="&IF(B2="Leaver",D2,AD$1))

    then copy down.

    Hope this helps.

    Pete

  5. #5
    Registered User
    Join Date
    03-28-2016
    Location
    Canada
    MS-Off Ver
    2010
    Posts
    36

    Re: Countblanks with IF

    Thanks! It works like a charm

+ 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. Countblanks
    By GordonP in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2016, 01:27 PM
  2. [SOLVED] Help with countblanks
    By Jay147 in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 11-11-2013, 01:35 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