+ Reply to Thread
Results 1 to 8 of 8

Count number of days between two dates, if the day is between 1-5

  1. #1
    Registered User
    Join Date
    11-12-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    4

    Count number of days between two dates, if the day is between 1-5

    I want to find the number of days between when I started a pack of pills to today. I only take these pills the first five days of each month, therefore I don't need the total difference, just those days.

    ie: If my begin date is July 7, 2013 and my end date is November 2, 2013 I would want the answer to be (not including the current date, because excel doesn't) 16 days.

    Help me please!

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Count number of days between two dates, if the day is between 1-5

    If you have start date in A2 and end date in B2 this should do it....

    =SUMPRODUCT((DAY(ROW(INDIRECT(A2&":"&B2-1)))={1,2,3,4,5})+0)
    Audere est facere

  3. #3
    Registered User
    Join Date
    11-12-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count number of days between two dates, if the day is between 1-5

    Thank you so much!
    I am just starting out, and I was stuck on the 'date' part.

  4. #4
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: Count number of days between two dates, if the day is between 1-5

    If your Start date is in A1 and your End date is in B1, put the following formula into C1 to see how many days have gone between them, not including the Start date day itself.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Keep in mind that your start and end date cells must be formatted as Date cells.
    -------------
    Tony

  5. #5
    Registered User
    Join Date
    11-12-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count number of days between two dates, if the day is between 1-5

    Similar question, and I think a similar answer I just can't hash it out yet. How do I find the number of days in a specific range that are Wednesdays?

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

    Re: Count number of days between two dates, if the day is between 1-5

    hi Randi. try:
    =SUMPRODUCT(--(TEXT(ROW(INDIRECT(A2&":"&B2)),"ddd")="wed"))

    or something i learned from daddylonglegs yesterday:
    =NETWORKDAYS.INTL(A2,B2,"1101111")

    available only in Excel 2010 & above. the red portion indicates which days you want to take in from Mon to Sun (1 representing exclusion & 0 is the inclusion)

    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

  7. #7
    Registered User
    Join Date
    11-12-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Count number of days between two dates, if the day is between 1-5

    Benishiryo,

    Thanks! I was just learning about sumproduct, figures. =)

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Count number of days between two dates, if the day is between 1-5

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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] Vlookup dates between two dates and count the number of days
    By nishikanth in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2013, 03:25 AM
  2. Help on count the number of days in between dates and then average number of days
    By Barbara Excel in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-30-2013, 12:13 PM
  3. Replies: 3
    Last Post: 08-19-2011, 10:32 AM
  4. Count number of days between 2 dates
    By Trueno in forum Excel General
    Replies: 14
    Last Post: 03-19-2009, 08:08 AM
  5. Count number of dates older than 30 days
    By altaquip_travis in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-12-2008, 03:20 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