+ Reply to Thread
Results 1 to 14 of 14

Extract fields based on current Date and Month

  1. #1
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Extract fields based on current Date and Month

    Dear Experts,

    I do have a situation where I do need your support. Please find here attached a sample workbook with the expected output. The first expectation is completely based on the current running date. So if the current date is not matched with the approaching due date then it needs to there in the expected output. So suppose for any activity if the due date is Monthly Day 2 then Day 2 due to activity will fall into the next month bucket.

    The second expectation is for Daily, As Needed, and As Received these items will be based on Month and not as per due dates.

    Thir Expectation is for Every Tuesday due activity. So suppose if today is Tuesday then the activity should get refect based on Month and Day.

    The reason for providing two expected out is supposed today is August 17, 2021, and we are still in August month accordingly I have provided for August 2021 expected output so when will touch to September 01, then for September month expected output also shared.

    I hope I have clarified everything. Please feel free to revert in case of any further clarification if required. Dear Experts, I really do feel that situation is very complex and would be highly grateful if can be resolved with expected output.

    Thank you for your valuable support and precious phase.

    Regards,

    Neilesh
    Attached Files Attached Files
    Last edited by Neilesh Kumar; 08-17-2021 at 06:01 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
    30,672

    Re: Extract fields based on current Date and Month

    Start by formatting dates as Excel dates i.e. 20/08/2021 NOT 20.08.2021.

  3. #3
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Extract fields based on current Date and Month

    I1 => 1 Aug 21

    B2:H7
    =IFERROR(INDEX(Details!B$1:B$28,AGGREGATE(15,6,ROW(Details!B$3:B$28)/IF((Details!$G$3:$G$28=$I$1)*(Details!$H$3:$H$28>"a"),1,(--SUBSTITUTE(Details!$H$3:$H$28,".","/")>TODAY())*(--SUBSTITUTE(Details!$H$3:$H$28,".","/")<=EOMONTH(TODAY(),0))),ROWS(B$3:B3))),"")

    I9 => 1 Sep 21

    B10:H18
    =IFERROR(INDEX(Details!B$1:B$28,AGGREGATE(15,6,ROW(Details!B$3:B$28)/IF((Details!$G$3:$G$28=$I$9)*(Details!$H$3:$H$28>"a"),1,(--SUBSTITUTE(Details!$H$3:$H$28,".","/")>$I$9)*(--SUBSTITUTE(Details!$H$3:$H$28,".","/")<=EOMONTH($I$9,0))),ROWS(B$10:B10))),"")
    Attached Files Attached Files

  4. #4
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    Hi Bo_Ry,

    From B3:H7 first line item is missing as output for Dt. August 20, 2021. Since August 20, 2021, is approaching date so that activity needs to be covered in the list.

    Please do the appropriate.

    Regards,

    Neilesh

  5. #5
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    Quote Originally Posted by JohnTopley View Post
    Start by formatting dates as Excel dates i.e. 20/08/2021 NOT 20.08.2021.
    formatted with Excel dates as 20/08/2021.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Extract fields based on current Date and Month

    Quote Originally Posted by Neilesh Kumar View Post
    Hi Bo_Ry,

    From B3:H7 first line item is missing as output for Dt. August 20, 2021. Since August 20, 2021, is approaching date so that activity needs to be covered in the list.

    Please do the appropriate.

    Regards,

    Neilesh
    This is what I see in my file on the post#3

    Result.png

  7. #7
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    Hi Bo_Ry,

    When i am opening the workbook i can see as below:

    image_2021-08-17_162707.png

  8. #8
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    After opening the workbook but before hit Enable Editing I am able to see the first line with 20.08.2021 as I do click on Enable Editing the first line getting disappears.

    Request you please do help me on the same.

    Regards,

    Neilesh

  9. #9
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Extract fields based on current Date and Month

    change date on Details column H to real date 20 Aug 2021 not text "20.8.2021"

    the real date is number.
    20 Aug 2021 when change format to general it will show 44428.

    and also check if =today() return 17 Aug 2021
    Attached Files Attached Files

  10. #10
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    Thank you so much Bo_Ry. Really appreciated your valuable support.

    Thank you once again.

    Regards,

    Neilesh

  11. #11
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    Quote Originally Posted by Bo_Ry View Post
    change date on Details column H to real date 20 Aug 2021 not text "20.8.2021"

    the real date is number.
    20 Aug 2021 when change format to general it will show 44428.

    and also check if =today() return 17 Aug 2021
    Hi Bo_Ry, Can we use for all August month output in Column G based on Cell I2 (08/01/2021). Because of what's happening for half month i need to use criteria as I2 for September due dates i need to use criteria as 09/01/2021.

    So what if we use the Current month formula for Cell I2 so as and when the month will get change accordingly the output will also get changed.

    Thank you for your valuable support.

    Regards,

    Neilesh
    Last edited by Neilesh Kumar; 08-17-2021 at 11:23 AM.

  12. #12
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    The main reason of output is to getting info on due dates falling under next month with preparer and backup team members name.

    So if for previous month activity is not due yet in the current month then that line item will be appeared as well with current month activity list and due dates.

    Team members are on rotational basis for every month for all the activities.

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,222

    Re: Extract fields based on current Date and Month

    Last try

    B2
    =IFERROR(INDEX(Details!B$1:B$26,AGGREGATE(15,6,ROW(Details!B$3:B$26)/((Details!$G$3:$G$26=$I$1)+(Details!$H$3:$H$26>TODAY())*(Details!$H$3:$H$26<EDATE($K$1,1))+(Details!$G$3:$G$26=$K$1)*(Details!$H$3:$H$26>"")>0),ROWS(B$3:B3))),"")

  14. #14
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    853

    Re: Extract fields based on current Date and Month

    Thank you Bo_Ry it worked perfectly as per expectation. Thank you so much for your valuable support.

    Regards,

    Neilesh

+ 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. Replies: 1
    Last Post: 02-28-2020, 04:15 AM
  2. Formula to extract Data fields based on given date and other criteria
    By harishkumarn in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-22-2019, 06:40 AM
  3. 12 month sum based on current date
    By lucas257 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-21-2018, 04:04 AM
  4. [SOLVED] Extract 2 corresponding fields by Date/Month/Year selection
    By suchetherrah in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-01-2015, 08:31 AM
  5. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 AM
  6. [SOLVED] VBA to identify the current month and previous month based on system date
    By ravikumar00008 in forum Excel General
    Replies: 10
    Last Post: 07-26-2012, 10:04 AM
  7. Current date formula based on month
    By Renz09 in forum Excel General
    Replies: 2
    Last Post: 05-05-2006, 02:04 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