+ Reply to Thread
Results 1 to 9 of 9

(UPDATE) DEFINING exact length of string for ISTEXT within AGGREGATE function

Hybrid View

  1. #1
    Registered User
    Join Date
    02-19-2020
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    51

    (UPDATE) DEFINING exact length of string for ISTEXT within AGGREGATE function

    Hi forum,

    I have this formula (it was given to me by a member of this forum few days ago):

    =IFERROR(AGGREGATE(15,6,$M$25:$W$29/ISTEXT($M$25:$W$29)/(--$M$25:$W$29>MAX(A$33:A33)),1),"")

    From the sample attached, I need the 5 digits jobs to go only in the table FULL LOADS and the 4 digits jobs to go only in the table JOBS.

    How can integrate a check in the formula so that it is calculated only for a string of a certain length?

    Any help would be greatly appreciated!

    Thank you,
    Alberto
    Attached Files Attached Files
    Last edited by Giulio Severini; 04-18-2020 at 10:52 AM.

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

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Please try At A32

    =IFERROR(AGGREGATE(15,6,$M$25:$W$27/ISTEXT($M$25:$W$27)/(LEN($M$25:$W$27)=5)/(--$M$25:$W$27>MAX(A$31:A31)),1),"")

    Change Number of digit in Red if needed.

  3. #3
    Registered User
    Join Date
    02-19-2020
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    51

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Hi Bo_Roy,

    nice to see you again
    Your solution works perfect!
    If you have some time, would you be so kind to explain to me how this formula works please?
    That would help me better understand future formulas (for instance, how could I have found out that I only needed to put an equal in this formula? I was opting for a nested IF indeed...)

    Thank you very much for your help and for your time!

    P.S. (and off topic): I see that you live in Thailand. Me and my wife did our honeymoon there in 2012. What a beautiful country!

    Alberto

  4. #4
    Registered User
    Join Date
    02-19-2020
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    51

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Hi Bo_Roy,
    Hi All,

    I have another question regarding this formula.
    Is there a way to make it work, in a specific table, for string GREATER than a certain length?

    I tried this: =IFERROR(AGGREGATE(15,6,$M$25:$W$27/ISTEXT($M$25:$W$27)/(LEN($M$25:$W$27)>5)/(--$M$25:$W$27>MAX(A$31:A31)),1),"") but it did not work.

    I attach sample for reference.

    Any help would be appreciated!

    Thanks,
    Alberto
    Attached Files Attached Files
    Last edited by Giulio Severini; 04-08-2020 at 04:44 AM.

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

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Formula only work with number
    Please unmerge cell and try at A32
    =SORT(UNIQUE(FILTER(INDEX(M25:X27,SEQUENCE(18,,,1/6),MOD(SEQUENCE(18,,0,2),12)+1),LEN(INDEX(M25:X27,SEQUENCE(18,,,1/6),MOD(SEQUENCE(18,,0,2),12)+1))>=5)))

    P.S. Thanks, Malta is unique and beautiful country. I have a plan to visits someday.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-19-2020
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    51

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Hi Bo_Ry,

    thanks, it seems that this formula is what I was looking for.
    Apparently, merged cells are deprecated eh! I will change the layout of my file and make use of unmerged cells.

    Many many thanks again!
    Alberto

  7. #7
    Registered User
    Join Date
    02-19-2020
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    51

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Hi Bo_Ry,

    I am having an issue with this formula, actually.
    First, it spills on the below cells (it does not seem to really affect the results since it still shows them as intended); is it ok?
    Second, if I change the range of the array from M25:X27 to M6:X27, it gives an EMPTY ARRAY error (CALC) although the cell interval is not empty.

    EDIT: this issue seems to happen with Office 36 for Windows and not for MAC. I will check better later and post an update.

    Thanks for any advice!
    Alberto
    Last edited by Giulio Severini; 04-09-2020 at 04:50 AM.

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

    Re: DEFINING exact length of string for ISTEXT within AGGREGATE function

    Spill is from New Dynamic array. Array formula will spill all data in array. No more copy formula down.
    The Calc is error from Filter function when array is empty.
    Add ,"" to return null string when array is empty. and correct Sequnece

    =SORT(UNIQUE(FILTER(INDEX(M6:X27,SEQUENCE(ROWS(M6:X27)*6,,,1/6),MOD(SEQUENCE(ROWS(M6:X27)*6,,0,2),12)+1),LEN(INDEX(M6:X27,SEQUENCE(ROWS(M6:X27)*6,,,1/6),MOD(SEQUENCE(ROWS(M6:X27)*6,,0,2),12)+1))>=5,"")))
    Last edited by Bo_Ry; 04-09-2020 at 05:29 AM. Reason: correct Sequence

  9. #9
    Registered User
    Join Date
    02-19-2020
    Location
    Malta
    MS-Off Ver
    Office 365
    Posts
    51

    Re: (UPDATE) DEFINING exact length of string for ISTEXT within AGGREGATE function

    Dear All,
    Dear Bo_Roy,

    regarding the formula

    =SORT(UNIQUE(FILTER(INDEX(M6:X27,SEQUENCE(ROWS(M6:X27)*6,,,1/6),MOD(SEQUENCE(ROWS(M6:X27)*6,,0,2),12)+1),LEN(INDEX(M6:X27,SEQUENCE(ROWS(M6:X27)*6,,,1/6),MOD(SEQUENCE(ROWS(M6:X27)*6,,0,2),12)+1))>=5,"")))

    I am using it successfully. However, I have added four new columns to the sheet but the additional columns are not calculated, although I have updated the range of the formula to

    =SORT(UNIQUE(FILTER(INDEX($M$6:$AB$27,SEQUENCE(ROWS($M$6:$AB$27)*6,,,1/6),MOD(SEQUENCE(ROWS($M$6:$AB$27)*6,,0,2),12)+1),LEN(INDEX($M$6:$AB$27,SEQUENCE(ROWS($M$6:$AB$27)*6,,,1/6),MOD(SEQUENCE(ROWS($M$6:$AB$27)*6,,0,2),12)+1))=5,"")))

    I have also tried to update the formula as follows:

    =SORT(UNIQUE(FILTER(INDEX($M$6:$AB$27,SEQUENCE(ROWS($M$6:$AB$27)*8,,,1/8),MOD(SEQUENCE(ROWS($M$6:$AB$27)*8,,0,2),12)+1),LEN(INDEX($M$6:$AB$27,SEQUENCE(ROWS($M$6:$AB$27)*8,,,1/8),MOD(SEQUENCE(ROWS($M$6:$AB$27)*8,,0,2),12)+1))=5,"")))

    but it does not work.

    How can I include columns from Y to AB in the formula?

    Attached there is the sample book, formulas in 01 MONDAY, section SHEET ENGINE.

    Thank you very much to everyone!

    Alberto
    Attached Files Attached Files

+ 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] MID function with variable string length
    By ABSTRAKTUS in forum Excel General
    Replies: 3
    Last Post: 12-07-2017, 11:32 AM
  2. need formula or vba to find exact string through list and find exact correct string
    By johnlara in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2016, 04:12 AM
  3. [SOLVED] Aggregate exact date
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-17-2014, 10:35 PM
  4. String length function
    By MacroMan! in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-19-2011, 05:14 AM
  5. Replies: 3
    Last Post: 12-08-2010, 07:51 AM
  6. Defining the length of an array variably
    By franzklammer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2006, 06:20 AM
  7. Defining string using InStr function help
    By Iwant2learn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-13-2006, 12:29 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