+ Reply to Thread
Results 1 to 11 of 11

Text join ignoring blanks but limited to a maximum of five entries

  1. #1
    Registered User
    Join Date
    05-24-2020
    Location
    Leicester, England
    MS-Off Ver
    Office 365 proplus
    Posts
    11

    Text join ignoring blanks but limited to a maximum of five entries

    Hello,
    (edited for more clarity)
    I need to a formula to join text in cells together ignoring blanks but stop at a maximum of 5 entries
    I've tried textjoin, this works fine in joining all the cells but I only need a maximum of 5 entries.

    For example using textjoin cell AP25 reads 6,8,9,13,15,18,19, but I only require the first 5 so i need it to read 6,8,9,13,15

    Text to columns would work but it would be great if I could do this via a formula.
    I need Column AQ to look as it is but by using a formula (I've typed the entries in)
    Hope this makes sense.

    Thanks for your help!!
    Attached Files Attached Files
    Last edited by JFawcett; 05-25-2020 at 05:38 PM. Reason: Included what I need the cell(s) to look like

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Text join ignoring blanks but limited to first five entries

    Hi,

    =LEFT(TEXTJOIN(REPT(" ",99)&CHAR(10),,W25:AO25),495)

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

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

    Re: Text join ignoring blanks but limited to first five entries

    Please try at AP4

    =TEXTJOIN(CHAR(10),,IFERROR(SMALL(IF(C4:U4=0,$C$1:$U$1),SEQUENCE(5))&",",""))

    ** Correction for OP Last edited **
    =TEXTJOIN(", ",,IFERROR(SMALL(IF(C4:U4=0,$C$1:$U$1),SEQUENCE(5)),""))
    Attached Files Attached Files
    Last edited by Bo_Ry; 05-24-2020 at 12:45 PM.

  4. #4
    Registered User
    Join Date
    05-24-2020
    Location
    Leicester, England
    MS-Off Ver
    Office 365 proplus
    Posts
    11

    Re: Text join ignoring blanks but limited to first five entries

    Hi thanks for your response I've edited the original post for more clarity.
    Last edited by JFawcett; 05-24-2020 at 12:44 PM.

  5. #5
    Registered User
    Join Date
    05-24-2020
    Location
    Leicester, England
    MS-Off Ver
    Office 365 proplus
    Posts
    11

    Re: Text join ignoring blanks but limited to first five entries

    Hi, looks like it worked when i downloaded the file you edited but the forumula just leaves the cells blank

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

    Re: Text join ignoring blanks but limited to a maximum of five entries

    Sequence function is available for Office 365 Monthly update.

    For Office 365 non-Update version

    =TEXTJOIN(", ",,IFERROR(SMALL(IF(C4:U4=0,$C$1:$U$1),{1,2,3,4,5}),""))


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    05-24-2020
    Location
    Leicester, England
    MS-Off Ver
    Office 365 proplus
    Posts
    11

    Re: Text join ignoring blanks but limited to a maximum of five entries

    excellent, thanks!

  8. #8
    Registered User
    Join Date
    05-24-2020
    Location
    Leicester, England
    MS-Off Ver
    Office 365 proplus
    Posts
    11

    Re: Text join ignoring blanks but limited to a maximum of five entries

    Hi Bo_Ry,
    Can you help me with this please?

    I'm trying to match the first three incorrect questions with the corresponding values in C2:N2 as you can see a mixture of text and numerical values

    I tried adjusting the formula which worked great for giving numerical values but these are now a mixture of numbers and text.

    I've typed in what I require into column Q.

    Thanks for your help
    Attached Files Attached Files

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

    Re: Text join ignoring blanks but limited to a maximum of five entries

    Please try at Q5

    =TEXTJOIN(", ",,IFERROR(INDEX($C$2:$M$2,SMALL(IF(C5:N5=0,$C$1:$N$1),{1,2,3,4,5})),""))

    Confirm by Ctrl+Shift+Enter
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    05-24-2020
    Location
    Leicester, England
    MS-Off Ver
    Office 365 proplus
    Posts
    11

    Re: Text join ignoring blanks but limited to a maximum of five entries

    Hello,

    Thanks for your help again.

    I've tried using your formula, however it only seems to return the first required value.

    Please see attached file.

    Thanks!
    Attached Files Attached Files

  11. #11
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Text join ignoring blanks but limited to a maximum of five entries

    Yes, Bo_Ry's formula should be:

    =TEXTJOIN(", ",,IFERROR(INDEX($C$2:$N$2,N(IF(1,SMALL(IF(C5:N5=0,$C$1:$N$1),{1,2,3,4,5})))),""))

    Regards

+ 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] SUMIF, ignoring blanks and find earliest date ignoring blanks
    By Chris_Devon in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-15-2019, 10:16 AM
  2. [SOLVED] Count or Sum Ignoring Specified Text & Blanks
    By mycon73 in forum Excel General
    Replies: 3
    Last Post: 11-24-2018, 03:26 AM
  3. Comparing multiple text strings and ignoring blanks
    By BM1988 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2017, 03:13 AM
  4. [SOLVED] Data Cleanup - ignoring blanks, ignoring rows with string values etc.
    By Huyaku in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2015, 08:17 AM
  5. Return most common text from column cells with formula while ignoring blanks
    By rosco01995 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-29-2014, 03:55 AM
  6. [SOLVED] Rolling average with data in a row using only last 10 entries ignoring blanks
    By Lasers Reef in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-22-2013, 09:37 PM
  7. Excel 2007 : sum cells ignoring blanks and text
    By mickurje in forum Excel General
    Replies: 2
    Last Post: 07-04-2010, 03:00 PM

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