+ Reply to Thread
Results 1 to 5 of 5

Count the number of blocks made on a range of date or certain date with multiple criteria

  1. #1
    Registered User
    Join Date
    04-28-2017
    Location
    Irvine
    MS-Off Ver
    2016
    Posts
    13

    Count the number of blocks made on a range of date or certain date with multiple criteria

    Hello excelforum. Kindly help me on this formula, I have been struggling this for a week and can't still get the right formula for it. I have browse several websites for the formula and every time I see something new I get more confused.

    I'm looking for the solution for this sheet. The Summary is where results are and formula, while the Monthly Tab shows the reservation made by the member on each month and date.
    https://docs.google.com/spreadsheets...it?usp=sharing

    I am looking to calculate the total regular blocks, reserved blocks, and borrowed blocks.
    - Regular blocks are blocks that are calculate today, and onward by the end of the month.
    Regular blocks formula:
    Please Login or Register  to view this content.
    - Reserved blocks are blocks that are made on the previous month. (eg. Current month is April, and reserve is March).
    Reserved blocks formula:
    Please Login or Register  to view this content.
    - Borrowed blocks are blocks that are made on the next month. (eg. Current month is April, and borrowed is May).
    Borrowed blocks formula:
    Please Login or Register  to view this content.
    Requesting the right formula with this condition:
    - Regular block - if "2" then count it as two instead of one. Right now my formula only calculate "1", and totally ignore "2" as shown in the formula.

    Also would it be possible to add additional criteria in regular block and compute it this way? >=Today(), month<=()? (eg. April 28 and the end of the month only, April 30)?

    - Reserved block & borrowed block - If the current reservation made on a particular date exceed his quota deduct on the reserved block first, and then if it is not enough use the borrowed block.

    Example. BB has a quota of 6 per month. And can use unused reservation on the previous month if it has any, and if it is not enough, it will use the reservation for the next month.

    Best regards
    Last edited by ebase02; 04-28-2017 at 04:22 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Count the number of blocks made on a range of date or certain date with multiple crite

    Attach a sample workbook (not image!).

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    04-28-2017
    Location
    Irvine
    MS-Off Ver
    2016
    Posts
    13

    Re: Count the number of blocks made on a range of date or certain date with multiple crite

    Hello John,

    Thank you. I have attached the google spreadsheet for it. I presented the formula that I have right now, mentioned my request of formula and the output that I am looking for.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Count the number of blocks made on a range of date or certain date with multiple crite

    Try the following:

    in B2

    =SUMIFS('Monthly Tab'!$E$2:$E$376,Date,">="&TODAY(),Date,"<="&EOMONTH(TODAY(),0),Name,A2)

    in E2

    =6-SUM(COUNTIFS(Date,">"&EOMONTH(TODAY(),-2)+1,Date,"<="&EOMONTH(TODAY(),-1),Name,A2,RB,1))

    in G3

    =6-SUM(COUNTIFS(Date,">"&EOMONTH(TODAY(),0)+1,Date,"<"&EOMONTH(TODAY(),1),Name,A2,RB,1))


    - Reserved block & borrowed block - If the current reservation made on a particular date exceed his quota deduct on the reserved block first, and then if it is not enough use the borrowed block.
    I don't understand the above. Your formulas have 6 (as a quota value?) so I would change this to variable (column) in your table
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-28-2017
    Location
    Irvine
    MS-Off Ver
    2016
    Posts
    13

    Re: Count the number of blocks made on a range of date or certain date with multiple crite

    Hello John,

    Thank you! I will try to use the formula that you gave and see if it is the output that I am looking for. I really do appreciate your time given in this matter. I might marked this as done, and escalate it to Commercial Services if ever I need to make another request to give you a proper credit.

    Best regards

+ 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. Formula to count number of times a date is 15 or 28 in a date range
    By jojo412 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-03-2017, 08:30 PM
  2. [SOLVED] Count and sum with multiple criteria including date range
    By Perk1961 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-23-2016, 04:46 PM
  3. [SOLVED] Count if multiple criteria and within date range
    By T15K in forum Excel General
    Replies: 5
    Last Post: 01-10-2016, 06:22 AM
  4. [SOLVED] Count number of values dependent between horizontal date range based on 2 date values
    By dcad81 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-06-2015, 08:16 AM
  5. Adding a date range to a unique data count based on multiple criteria
    By Matthew_Smith86 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-10-2015, 08:50 AM
  6. Count - multiple criteria, multiple sheets, and date range.
    By threecliffs in forum Excel General
    Replies: 6
    Last Post: 06-14-2011, 01:36 PM
  7. Replies: 4
    Last Post: 04-08-2011, 05:24 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