+ Reply to Thread
Results 1 to 10 of 10

Creating true / false array of year / month combinations

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Creating true / false array of year / month combinations

    Hi, I have used match and this seems to work fine, but I just wondered if anyone has a better /different approach to the problem,
    I want a true false to use as filter in a pivot t , so I want eg true = Year 1 and month 2,3,4 and Year 2 and month 3,4,

    so ; dr = Date range ;

    Please Login or Register  to view this content.
    and then dropped into the filter, so if anyone wants to suggest a better approach I'd be interested.

    Richard
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: Creating true / false array of year / month combinations

    This produces the same result:

    =BYROW(H4:H67,LAMBDA(dr,OR(AND(YEAR(dr)=B4,ISNUMBER(MATCH(TEXT(dr,"mmm"),C4:C6,0))),AND(YEAR(dr)=D4,ISNUMBER(MATCH(TEXT(dr,"mmm"),E4:E6,0))))))

    This might be better placed in Charting & Pivots - shall I move the thread for you?
    Last edited by AliGW; 06-23-2024 at 12:28 AM. Reason: Additional information added.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,179

    Re: Creating true / false array of year / month combinations

    Or try this:

    =LET(dr,TEXT(H4:H67,"yyyymmm"),a,TEXTJOIN(";",1,IF(C3:E3="Month",B4:D4&C4:E6,"")),ISNUMBER(SEARCH(dr,a)))

  4. #4
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Creating true / false array of year / month combinations

    Hi,
    Just to let you know regarding the duplicate, I've had a few delivery failure messages which I don't think are correct but I end up repeating things,
    as to answers thank you both I will work through them.

    Richard.

  5. #5
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Creating true / false array of year / month combinations

    Thank you , that is a bit shorter,

    Richard.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: Creating true / false array of year / month combinations

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: Creating true / false array of year / month combinations

    Quote Originally Posted by Dicken View Post
    Hi,
    Just to let you know regarding the duplicate, I've had a few delivery failure messages which I don't think are correct but I end up repeating things,
    as to answers thank you both I will work through them.

    Richard.
    All you have to do to check your threads is go to your profile: https://www.excelforum.com/members/1473571.html

    Click on the Latest Started Threads link. Don't rely on subscriptions to your threads.

  8. #8
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Creating true / false array of year / month combinations

    Yes, you can move it, if it's ok to leave open for a bit longer, before i mark solved.

    RD

  9. #9
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    777

    Re: Creating true / false array of year / month combinations

    Hmmm, I'm going to have to work on the conacat, you've done, I've tried it in isolation and can see how it works,
    but it's going to take a while to really see what get's mapped to what ,

    RD

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,007

    Re: Creating true / false array of year / month combinations

    If you type just this into an empty cell somewhere:

    =TEXTJOIN(";",1,IF(C3:E3="Month",B4:D4&C4:E6,""))

    you will see that it returns a list of text strings in one cell. These are then searched at the end of the formula.

    I shall move the thread.

+ 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] DAX measure use Month Number as value to return true / false
    By Dicken in forum Office 365
    Replies: 4
    Last Post: 12-19-2023, 12:42 PM
  2. How to Identify the Combinations of True or False in Multiple Columns
    By jdub03 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-26-2019, 12:13 PM
  3. If array Formula (different True and False within a If function.
    By mortphil in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-14-2013, 10:05 AM
  4. [SOLVED] I Need Help Creating a Formula to That Sorts True/False Results
    By artiststevens in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-09-2013, 07:38 AM
  5. Return True or False if date range falls within current month
    By kieran614 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 12:02 PM
  6. Creating List with True/False Field
    By thirteen in forum Excel General
    Replies: 2
    Last Post: 07-01-2009, 12:44 PM
  7. Creating True or false checkboxes
    By L_ter in forum Access Tables & Databases
    Replies: 1
    Last Post: 03-19-2009, 12:04 AM

Tags for this Thread

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