+ Reply to Thread
Results 1 to 4 of 4

CONC or TEXTJOIN multiple services for clients

Hybrid View

RookA1 CONC or TEXTJOIN multiple... 12-11-2023, 06:42 PM
Rick Rothstein Re: CONC or TEXTJOIN multiple... 12-11-2023, 07:46 PM
HansDouwe Re: CONC or TEXTJOIN multiple... 12-11-2023, 07:58 PM
RookA1 Re: CONC or TEXTJOIN multiple... 12-12-2023, 11:25 AM
  1. #1
    Registered User
    Join Date
    04-27-2017
    Location
    New York
    MS-Off Ver
    MS 365 v2211
    Posts
    87

    CONC or TEXTJOIN multiple services for clients

    Hello, I am trying to concatenate or text join cells based on three optional services that clients can accept: oil change, tire rotation and annual inspection. Clients' needs vary and they may have selected 0, 1, 2 or all 3 services.

    This data is being plunked directly into a letter, so it also needs to be punctuated properly with commas if they want more than one service, and "and" before the last service (no punctuation if they just want one service).

    I might be overcomplicating this. Is there a better way to reach the end goal without writing a giant IF statement? Example spreadsheet is attached.

    Thank you,
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,463

    Re: CONC or TEXTJOIN multiple services for clients

    Give this formula a try...
    Formula: copy to clipboard
    =B2&" "&IFERROR(TEXTJOIN(CHOOSE(COUNTA(C2:E2),," and ",{", "," and "}),,C2:E2),"")
    Last edited by Rick Rothstein; 12-11-2023 at 08:15 PM.

  3. #3
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,466

    Re: CONC or TEXTJOIN multiple services for clients

    Or try in F2 and copy down:
    Formula: copy to clipboard
    =LET(t,TEXTJOIN(", ",,C2:E2),B2&" "&IFERROR(REPLACE(t,1+LEN(TEXTBEFORE(t,",",-1)),1," and"),""))
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-27-2017
    Location
    New York
    MS-Off Ver
    MS 365 v2211
    Posts
    87

    Re: CONC or TEXTJOIN multiple services for clients

    Success. I ended up using Rick's formula for a perfect match. Hans, I came really close with yours, but couldn't quite get the single-service clients to generate (e.g. clients who get annual inspection only, or oil change only). Thank you both for the input, both formulas are above my current skillset.

+ 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. Textjoin for multiple sheets without duplicate value
    By richboom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2023, 10:04 PM
  2. [SOLVED]Using TEXTJOIN with multiple criterions
    By Big_Excel_Noob in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2019, 08:57 PM
  3. Replies: 3
    Last Post: 02-05-2019, 06:02 PM
  4. [SOLVED] TEXTJOIN with multiple criteria
    By Allerdrengen in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-25-2018, 09:22 AM
  5. Replies: 1
    Last Post: 03-25-2016, 02:19 AM
  6. Replies: 3
    Last Post: 11-17-2014, 02:18 PM
  7. [SOLVED] Date & < sign I want to Conc.
    By Jennifer in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-24-2005, 12:06 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