+ Reply to Thread
Results 1 to 8 of 8

Substitute word from one pick list with a word from another picklist

Hybrid View

  1. #1
    Registered User
    Join Date
    10-31-2024
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    5

    Substitute word from one pick list with a word from another picklist

    Hi,
    I have tried to simplify a list by splitting into two picklists where I want to substitute the word Customer for the actual customer name, rather than having a 400 deep picklist, I can have 40.
    E.g. Customer Rocks is selected in A1, the name of the customer ("Harry") is in B1. In C1 you substitute the word customer with the customer name in B1. C1 would therefore be "Harry Rocks".

    Within my picklist I also have words in front of "Customer", and therefore I can't just replace by place value.

    A1= Customer Rocks
    A2= New Customer submission

    B1 = Harry
    B2 = Harry

    C1 = Harry Rocks
    C2 = New Harry submission

    Is there a way to do this?
    Attached Files Attached Files
    Last edited by Miles_G; 10-31-2024 at 06:32 PM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,505

    Re: Substitute word from one pick list with a word from another picklist

    Welcome to the forum.

    Try in C1 and drag down:
    Formula: copy to clipboard
    =IF(LEFT(A1,3)="New","New"&" "&XLOOKUP(A1,$M$1:$M$4,$N$1:$N$4,"Not found")&" "&SUBSTITUTE(SUBSTITUTE(A1,"Customer ",""),"New",""),IF(LEFT(A1,4)="Last","Last"&" "&XLOOKUP(A1,$M$1:$M$4,$N$1:$N$4,"Not found")&" "&SUBSTITUTE(SUBSTITUTE(A1,"Customer ",""),"Last",""),XLOOKUP(A1,$M$1:$M$4,$N$1:$N$4,"Not found")&" "&SUBSTITUTE(A1,"Customer ","")))

    Good luck!

  3. #3
    Registered User
    Join Date
    10-31-2024
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Substitute word from one pick list with a word from another picklist

    Thank you that worked, I can iterate from there if there are any different words in front.

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,505

    Re: Substitute word from one pick list with a word from another picklist

    You’re welcome. Glad to help.
    Thank you for the feedback and for the reputation added.
    Have a blessed day.

  5. #5
    Registered User
    Join Date
    10-31-2024
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Substitute word from one pick list with a word from another picklist

    Actually, that only works if you alter the pick list in column A. If I alter any name in B, the customer name doesn't change. Ah well, I'll see what I can fathom out.

  6. #6
    Registered User
    Join Date
    12-30-2020
    Location
    Here
    MS-Off Ver
    M365
    Posts
    63

    Re: Substitute word from one pick list with a word from another picklist

    Try this formula.
    Formula: copy to clipboard
    C1 =SUBSTITUTE( A1, "Customer", FILTER($N$1:$N$4, COUNTIF(A1, "*"&$M$1:$M$4&"*")>0, "??") )

  7. #7
    Registered User
    Join Date
    10-31-2024
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Substitute word from one pick list with a word from another picklist

    Unfortunately, that has the same issue, that changing anything in column B doesn't update Column C

  8. #8
    Registered User
    Join Date
    10-31-2024
    Location
    California, USA
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Substitute word from one pick list with a word from another picklist

    C1 =SUBSTITUTE( A1, "Customer", B1) seems to work

+ 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] Formula to search and match a word from colum A to a list of word given in another column
    By Atif Bhatti in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-31-2023, 03:08 PM
  2. [SOLVED] Substitute word by list
    By vasc in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2019, 07:26 AM
  3. Include random word from the word list with a phrase as suffix or prefix
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-10-2016, 05:53 AM
  4. Replies: 2
    Last Post: 08-05-2013, 04:45 PM
  5. [SOLVED] How can I replace a word from a sentence in a cell & substitute word from another cell
    By rionoah in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2012, 08:44 AM
  6. Creating an Excel picklist to import into word?
    By scarlet in forum Excel General
    Replies: 4
    Last Post: 09-03-2005, 12:05 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