+ Reply to Thread
Results 1 to 6 of 6

countif - determining the range automatically

Hybrid View

  1. #1
    Registered User
    Join Date
    01-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    countif - determining the range automatically

    Hi,

    I want to determine the range in the countif function automatically and relating to a date (i.e. today).

    In the attached sheet there are two employees who worked during a certain period, a day worked is 1

    Then I would like to count how many days each employee has worked up until today, counting the 1's in the row of that employee until today.

    Does anyone have a simple solution to that please ?

    Thanks in advance !

    Cheers,
    Bart
    The Netherlands
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: countif - determining the range automatically

    This should work

    =SUM(INDIRECT(("D"&ROW()&":"&ADDRESS(ROW(),MATCH(B$1,D$3:S$3,0)+3))))
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Expert boopathiraja's Avatar
    Join Date
    07-12-2013
    Location
    Coimbatore,TamilNadu, India
    MS-Off Ver
    Excel 2007, 2013, 2016, 365
    Posts
    1,455

    Re: countif - determining the range automatically

    Try

    =SUMPRODUCT((D4:S4)*($D$3:$S$3<=$B$1))
    Click just below left if it helps, Boo?ath?

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: countif - determining the range automatically

    Try this.....

    In B4
    =SUMPRODUCT(--(ISNUMBER($D$3:$AAA$3)),--($D$3:$AAA$3<=$B$1),--($D4:$AAA4=1))
    and copy down.
    Where B1=Today().
    **Adjust the range as per your need.

    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  5. #5
    Registered User
    Join Date
    06-17-2014
    Location
    Uppsala, Sweden
    MS-Off Ver
    2010
    Posts
    43

    Re: countif - determining the range automatically

    Another formula to the buffet table:

    Paste in B4:
    =COUNTIFS(D3:S3;"<"&B1;D4:S4;1)
    Paste in B5:
    =COUNTIFS(D3:S3;"<"&B1;D5:S5;1)

  6. #6
    Registered User
    Join Date
    01-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: countif - determining the range automatically

    Solved ! Many thanks. I picked the formula of Johansoder as it is the shortest one. Cheers, bart

+ 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] A problem with determining the given value in the particular range!
    By Arty_1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-13-2014, 02:53 AM
  2. Replies: 0
    Last Post: 05-04-2011, 06:26 PM
  3. Determining MAX in Range the contains =NA()
    By PosseJohn in forum Excel General
    Replies: 3
    Last Post: 12-02-2010, 08:32 AM
  4. Automatically determining a specific date
    By Wire in forum Excel General
    Replies: 3
    Last Post: 04-23-2009, 11:54 PM
  5. determining range
    By inky in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-09-2007, 10:49 PM

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