+ Reply to Thread
Results 1 to 15 of 15

Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Functions

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Functions

    Hi,

    Can one of the forum experts please help me to come up with the formula which returns earliest date/time for the email campaign IDs in "Deployed?" column in the attached spreadsheet?

    The ultimate goal is for pivot table (Pivot tab in the file) to display date/time stamp when first review was submitted for the corresponding campaign ID. I inserted a column 'C' ("Date & Time for Deployed?") in "Data" tab where I want to insert the formula which:

    > searches column 'B' ("Submission Date & Time") for earliest submission date/time for corresponding value (campaign IDs) in column 'H' ("Deployed?") and returns only earliest date/time but don't return any value if the date/time is not the earliest.

    Thus the earliest date/time stamp would be displayed in pivot table below the each campaign ID for 5 Day email and for 28 Day email when "Date & Time for Deployed?" field is added to 'Row Labels' in the pivot table.

    For example, '5day_latency_RZ040815' campaign ID from "Deployed?" column has total of two date/time stamps in column B ("Submission Date & Time"): 4/8/15 8:55:43 AM and 4/8/15 8:25:04 AM. Note, that the actual data is larger than the sample I provided and for one campaign ID can be hundredth date/time stamps.

    The earliest date that I need to be displayed in the pivot table is 4/8/15 8:25:04 AM, it is when the first review submissions was made, meaning that 5 Day email was deployed.

    I am trying to use IFERROR/Index/Match/Min functions but the formula doesn't work: =IFERROR(INDEX(H:H,MATCH(MIN(B:B,0)),"")

    Any help will be highly appreciated!!!


    DATA_SAMPLE.xlsx

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    I'm not sure if I followed your explanation. Check if such array formula * in C2 and copied down gets you closer to required result:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    *) confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    Your formula works under the conditions that I provided but I didn't explain myself well. I apologize for the confusion.

    The formula should not involve column 'K'. It should search earliest date/time in column 'B' for values in column 'H' and return this earliest date/time in column 'C'.

    As you can see the formula in column 'H' (Deployed?) already returns the campaign IDs from column 'K' for today's date. So I don't want to mess up with it. Can you please modify the formula to accommodate these conditions?

    Thanks so MUCH Kaper!

  4. #4
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    The purpose of formula in column 'H' is narrow down the campaign IDs from column 'K' to the ones that are appended with today's date. I need to verify that today these campaign IDs were deployed.

    And the purpose of formula in column 'C' is to get the earliest review submission time, thus validating the time that campaign IDs were deployed and display the time that it was deployed.

    I hope it helps to better understand what I need.

  5. #5
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    I hope an Excel expert can assist to create a correct formula. The sample data is attached.

    The ultimate goal is for pivot table (Pivot tab in the file) to display date/time stamp when first review was submitted for the corresponding campaign ID. I inserted a column 'C' ("Date & Time for Deployed?") in "Data" tab where I want to insert the formula which:

    returns in column 'C' the earliest submission date/time from column 'B' ("Submission Date & Time") for for corresponding value in column 'H' ("Deployed?") but don't return any value if there is no value in column 'H' and if the date/time is not the earliest.

    Thus the earliest date/time stamp would be displayed in pivot table below the each campaign ID for 5 Day email and for 28 Day email when "Date & Time for Deployed?" field is added to 'Row Labels' in the pivot table.

    For example, '5day_latency_RZ040815' campaign ID from "Deployed?" column has total of two date/time stamps in column B ("Submission Date & Time"): 4/8/15 8:55:43 AM and 4/8/15 8:25:04 AM. Note, that the actual data is larger than the sample I provided and for one campaign ID can be hundredth date/time stamps.

    The earliest date that I need to be displayed in the pivot table is 4/8/15 8:25:04 AM, it is when the first review submissions was made, meaning that 5 Day email was deployed.

    I am trying to use IFERROR/IF/Index/Match/Min functions but the formula doesn't work: =IFERROR(INDEX(H:H,MATCH(MIN(B:B,0)),"")

    The purpose of formula in column 'H' is narrow down the campaign IDs from column 'K' to the ones that are appended with today's date. I need to verify that today these campaign IDs were deployed.

    And the purpose of formula in column 'C' is to get the earliest review submission time, thus validating the time that campaign IDs were deployed and display the time that it was deployed.



    Thanks so much!!!!!
    Attached Files Attached Files
    Last edited by Neyme; 04-08-2015 at 05:09 PM.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    is not attached

  7. #7
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    Here you go. DATA_SAMPLE.xlsx
    Last edited by Neyme; 04-08-2015 at 05:20 PM.

  8. #8
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    ups, sorry. little mistake
    Last edited by sandy666; 04-08-2015 at 05:34 PM. Reason: max to min

  9. #9
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    I appreciate your help but formula unfortunately doesn't work. It returns the same value in every single row: 4/8/15 12:00:05 AM. See the screen shoot. The formula should not return values (stay blank) if the corresponding cell in column 'H' is blank. In addition, the formula should not use 'I' through 'L' columns. Would you be able to modify this formula to accommodate my conditions?

    incorrect.png

  10. #10
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    now here is 9 april 2015 and col H is "empty"
    I think your problem is for "locals" excel gurus

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: IF, INDEX, MATCH, MIN to Satisfy Multiple conditions

    Perhaps this ARRAY formula...
    =MIN(IF($K$2:$K$545=K2,$B$2:$B$545))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    Neyme, please stop posting duplicate threads. This the third thread on this same question. I have closed 1 (with no responses), and will merge this 1 with the other that also has replies on it

  13. #13
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    I really need to get an quick answer and a solution to this problem. I noticed that new threads get an answer quicker. Sorry about that. I'll stop duplicate posting. I hoped that you will address my question since I had a great experience with your prompt and elegant solutions.
    Last edited by Neyme; 04-08-2015 at 10:38 PM.

  14. #14
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    Your formula returns correct MIN date/time (earliest date/time)in column 'C' for values in column 'H'

    but I need to have blank cells in column'C' if the corresponding row cell in column 'H' is blank.

    In addition, can the formula utilize only columns 'B', 'C' and 'H' and do not use columns 'I' through 'L'.

    The purpose of formula in column 'H' is to narrow down the campaign IDs from column 'K' to the ones that are appended with today's date. I need to verify that today these campaign IDs were deployed.

    And the purpose of formula in column 'C' is to get the earliest review submission time, thus validating the time that campaign IDs were deployed and display the time that it was deployed. So the pivot table will show only the submission date/time for today's campaign IDs in column 'H'. I hope it helps to better understand what I need.

    Can it be done by modifying your formula?


    Need Return Blank Cells.PNG

    Thanks so much!
    Last edited by Neyme; 04-08-2015 at 11:05 PM.

  15. #15
    Registered User
    Join Date
    11-21-2013
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    99

    Re: Return earliest/latest date/time to utilize in pivot table If/Index/Match/MIN Function

    All advice and formula provided so far do not work. I am trying to create a formula which would:

    > return the smallest, earliest date/time from column 'B' for a value in column 'H'. The formula should be in column'C'. If the cell in column 'H' is blank, then the formula should return nothing (stay blank) in column 'C'.

    I am still trying to figure it out but get the #VALUE error. See the screenshot below and the attached file (Weekend Email Health Check) from which I made the screenshot. The formula I am using is:

    =IF(NOT(ISBLANK(H2)),(MIN(IF($H$2:$H$2561,$B$2:$B$2561,""))))

    Weekend Email Healthcheck1.xlsx

    Screenshot.png
    Last edited by Neyme; 04-09-2015 at 01:06 PM.

+ 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] Formula to return earliest and latest time.
    By Shellybelly in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-07-2014, 01:35 AM
  2. Replies: 3
    Last Post: 08-31-2014, 06:39 AM
  3. Getting the earliest and latest date in Pivot Table
    By dluhut in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-02-2013, 01:54 PM
  4. Index/Match functions used with a pivot table
    By razkowski in forum Excel General
    Replies: 1
    Last Post: 07-12-2012, 06:22 PM
  5. identify earliest & latest date groups in table
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 07-19-2011, 04:26 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