+ Reply to Thread
Results 1 to 9 of 9

calculate % out of 100 based on date range.

  1. #1
    Registered User
    Join Date
    06-29-2020
    Location
    United States
    MS-Off Ver
    Excel Professional Plus 2016
    Posts
    1

    calculate % out of 100 based on date range.

    I have 10 items which would be 100%
    I have a date range 6-1 to 6-5

    Based on the date range, I need a formula that will calculate the percentage.

    I included simple example with expected results based on date range if someone would assist.

    Thank you,
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: calculate % out of 100 based on date range.

    Does it come from same example?

    https://www.excelforum.com/excel-for...ml#post5357415
    Quang PT

  3. #3
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,829

    Re: calculate % out of 100 based on date range.

    In your example, why is 6-3 to 6-5 20%? I only see one entry that has a date between 6-3 to 6-5 for Tier B, and that is row 11. Wouldn't that also be 10%?

  4. #4
    Forum Contributor
    Join Date
    09-15-2005
    Location
    Florida
    MS-Off Ver
    Excel Professional Plus 2016
    Posts
    142

    Re: calculate % out of 100 based on date range.

    Quote Originally Posted by Gregb11 View Post
    In your example, why is 6-3 to 6-5 20%? I only see one entry that has a date between 6-3 to 6-5 for Tier B, and that is row 11. Wouldn't that also be 10%?
    That is correct, I meant to put 6-5 as well so that there are two of that entries within that range.

  5. #5
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,829

    Re: calculate % out of 100 based on date range.

    I entered the date range in cells N4 and N5. So the formula you could enter into N7 is this:

    =COUNTIFS(Table13[TimeStamp],">="&N4,Table13[TimeStamp],"<="&N5,Table13[Tier],L7)/COUNTIFS(Table13[Tier],L7)
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    09-15-2005
    Location
    Florida
    MS-Off Ver
    Excel Professional Plus 2016
    Posts
    142

    Re: calculate % out of 100 based on date range.

    Quote Originally Posted by Gregb11 View Post
    I entered the date range in cells N4 and N5. So the formula you could enter into N7 is this:

    =COUNTIFS(Table13[TimeStamp],">="&N4,Table13[TimeStamp],"<="&N5,Table13[Tier],L7)/COUNTIFS(Table13[Tier],L7)
    IT WORKED!!

    How ever when I tried it using my real scenario it yelled at me with error. The formula entered is referencing another sheet:


    =COUNTIFS(Westside!,West[TIME STAMP],Report!">="&B1,WESTSIDE!,West[TIME STAMP],Report!"<="&B2,REPORT!,A18/COUNTIFS(REPORT!,A18))

    Answer should be in the "Report" sheet of B17 Tried different version of the formula but the above is what I thought it should look like.

    A18 of the "Report" sheet is a helper cell that I substituted with your original formula of "Tier" B
    Attached Files Attached Files
    Last edited by rogrand; 06-30-2020 at 02:15 AM.

  7. #7
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,829

    Re: calculate % out of 100 based on date range.

    It's hard to know what you're trying to do now based on your data. There's NO data under the Time Stamp column nor under the "Trained and device..." column. Plus, since you're referencing a table, you shouldn't need to reference the sheet name. Also, it looks like you have commas in your formula where you shouldn't.

  8. #8
    Forum Contributor
    Join Date
    09-15-2005
    Location
    Florida
    MS-Off Ver
    Excel Professional Plus 2016
    Posts
    142

    Re: calculate % out of 100 based on date range.

    Quote Originally Posted by Gregb11 View Post
    It's hard to know what you're trying to do now based on your data. There's NO data under the Time Stamp column nor under the "Trained and device..." column. Plus, since you're referencing a table, you shouldn't need to reference the sheet name. Also, it looks like you have commas in your formula where you shouldn't.
    Good Morning Gregb11,

    Sorry if I am making it difficult. Initially I created a simple spreadsheet to get some direction so I can replicate it using same thought proccess . Needing the same result under the posted spreadsheet which I though I could handle the different conditions.

    B17 under "Report" sheet is the intended cell.

    As with your example, I was targeting the "B" Tier column, however, since in my original spreadsheet I have A, B, and C formula, it would not work as per the statements that refer to COUNTIFS(Table13[Tier],L7) where L7 represents only "B". Hence, I created a helper cell "Yes" so it can find any item under the the column J that has a "Yes". Please advise where the formula needs to be revised if it has a logical order using your formula as my template.

    Thank youm

  9. #9
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,829

    Re: calculate % out of 100 based on date range.

    I created a helper cell "Yes" so it can find any item under the the column J that has a "Yes"
    This is confusing because there IS NO value of "YES" in column J.

    There's also nothing under the Time Stamp column.

    Maybe you could put in some data and show the results you expect based on the sample data - that might make it more clear for me.

    Lastly, you have a circular reference under column K AND column L. These formulas are referring to themselves, which it shouldn't.

    That all being said, I tried putting something together that I THINK might work or at least can be a start. I mocked up some data myself and attached the file so you can see the data I entered on sheet "Westside". On the "Report" sheet, in B17 I entered this formula:

    =COUNTIFS(Table14[Tier],"A",Table14[Trained and device setup complete?
    Yes],Report!$A$18,Table14[Time Stamp],"<="&B$2,Table14[Time Stamp],">="&B$1)

    Take a look and let me know of any questions/issues.
    Attached Files Attached Files
    Last edited by Gregb11; 06-30-2020 at 06:39 PM. Reason: removed my first question

+ 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] Calculate Number of Releases Based on Date and Named Range
    By mac_squared in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-19-2019, 01:43 PM
  2. Calculate sums based on date range
    By konbanwa in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2017, 02:42 PM
  3. [SOLVED] Calculate # days in week based on date range
    By Peelah in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2016, 07:01 PM
  4. [SOLVED] Calculate based on date and time range
    By local1 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-25-2015, 08:33 AM
  5. Calculate Effective Date based on Another Date Range
    By Alphabex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2015, 01:43 PM
  6. [SOLVED] Need formula to calculate monthly costs based on date range
    By NS4Excel in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-22-2015, 01:13 PM
  7. [SOLVED] Calculate Work hours between date range based on Odd/Even weeks
    By KeAnd31 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-04-2014, 07:53 AM

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