+ Reply to Thread
Results 1 to 6 of 6

Identify rows within date range with criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    05-14-2015
    Location
    orlando
    MS-Off Ver
    2011
    Posts
    4

    Question Identify rows within date range with criteria

    I have a history table that tracks changes to project records. Im having problems creating formula that can indicating earliest history record with the stage of "Opportunity".

    My end goal is to create columns things like "total days within a particular stage" and columns to help determine how many project records were in a particular stage during each month out of the year.

    History ID Project ID Record Name Stage Date
    1 1 Alpha Project Prospect 5/20/2017
    2 1 Alpha Project Opportunity 10/21/2017
    3 2 Beta Project Opportunity 7/4/2017
    4 3 Gamma Project Prospect 9/1/2016
    5 4 Delta Project Opportunity 4/6/2017

  2. #2
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Identify rows within date range with criteria

    Use a pivottable or place an example file.

  3. #3
    Registered User
    Join Date
    05-14-2015
    Location
    orlando
    MS-Off Ver
    2011
    Posts
    4

    Re: Identify rows within date range with criteria

    Forum wants me to post more before I can attach files.

    Please see the following. paste in browser:
    bit.ly/2LylfZJ

    Here is a sample table with some of the other formula that I'm using.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,417

    Re: Identify rows within date range with criteria

    Is this something like you had in mind?

    This formula in H2 to return the earliest date.
    Formula: copy to clipboard
    =MIN($E$2:$E$100)
    Then the first of each following month in H3 and filled down.
    Formula: copy to clipboard
    =EDATE(H2,1)


    Then in I2 filled across and down to get the counts.
    Formula: copy to clipboard
    =COUNTIFS($D$2:$D$100,I$1,$E$2:$E$100,">"&EOMONTH($H2,-1),$E$2:$E$100,"<="&EOMONTH($H2,0))




    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    1
    History ID
    Project ID
    Record Name
    Stage
    Date
    Prospect
    Opportunity
    2
    1
    1
    Alpha Project
    Prospect
    5/20/2017
    9/1/2016
    1
    0
    3
    2
    1
    Alpha Project
    Opportunity
    10/21/2017
    10/1/2016
    0
    0
    4
    3
    2
    Beta Project
    Opportunity
    7/4/2017
    11/1/2016
    0
    0
    5
    4
    3
    Gamma Project
    Prospect
    9/1/2016
    12/1/2016
    0
    0
    6
    5
    4
    Delta Project
    Opportunity
    4/6/2017
    1/1/2017
    0
    0
    7
    2/1/2017
    0
    0
    8
    3/1/2017
    0
    0
    9
    4/1/2017
    0
    1
    10
    5/1/2017
    1
    0
    11
    6/1/2017
    0
    0
    12
    7/1/2017
    0
    1
    13
    8/1/2017
    0
    0
    14
    9/1/2017
    0
    0
    15
    10/1/2017
    0
    1
    16
    11/1/2017
    0
    0
    17
    12/1/2017
    0
    0
    18
    1/1/2018
    0
    0
    19
    2/1/2018
    0
    0
    Dave

  5. #5
    Registered User
    Join Date
    05-14-2015
    Location
    orlando
    MS-Off Ver
    2011
    Posts
    4

    Re: Identify rows within date range with criteria

    Each history record may or may not have a stage change. What I'm looking for is if Project Alpha changes to "Opportunity" on 3/1/2017 and then to a different stage on 6/6/2017, it will be counted as an active "Opportunity" during March, April, May, and June.

    I need to find a way to determine how many projects are in the opportunity stage during a given month.

    If I understand your formula correct, it only accounts for if there is a history record with that stage during a given month but it does not account for the months between. Am I mistaken?

  6. #6
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2405
    Posts
    13,417

    Re: Identify rows within date range with criteria

    If I understand your formula correct, it only accounts for if there is a history record with that stage during a given month but it does not account for the months between. Am I mistaken?
    No you aren’t mistaken.

    Are you OK with helper columns? May we take liberties with the layout of the source data? May we sort the source data?

    I will probably have some more questions. I need to rethink this one.

    In the meantime what method did you use in the attempt to upload? If you used the paperclip icon that hasn't worked for a while. Try it this way and see if the forum still won't let you upload.

    To attach a representative file to your post: (Please no pics or screenshots ... saves retyping data.),
    • be sure to desensitize the data
    • click “Go Advanced” (next to Post Quick Reply – bottom right),
    • scroll down until you see “Manage Attachments”, click that,
    • click “Browse”.
    • select your file(s)
    • click “Upload”
    • click “Close window”
    • click “Submit Reply”

    The file name will appear at the bottom of your reply.

+ 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. Copy rows of data that meet date range criteria to new sheet
    By natik in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2015, 09:58 PM
  2. Identify Cells/ Rows based on Criteria and evaluated by Timestamp?
    By iskivt30 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-27-2014, 02:58 AM
  3. Replies: 1
    Last Post: 01-02-2013, 01:14 PM
  4. Date Range - Start and End Date - Identify dates in a quarter
    By Nikki Fox in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2012, 06:05 AM
  5. Identify rows matching certain criteria
    By Daz783 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-13-2010, 10:04 PM
  6. Copy Rows In New Sheet Based On Date Range Criteria
    By ahmedwaseem2000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2006, 05:45 AM
  7. Need to identify a column within a range that meets criteria
    By stebro in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-25-2005, 10:05 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