+ Reply to Thread
Results 1 to 7 of 7

SUBSTITUTE/IF Formula for specified and unspecified text in cells

  1. #1
    Registered User
    Join Date
    07-29-2022
    Location
    Manchester, England
    MS-Off Ver
    Version 2206
    Posts
    8

    SUBSTITUTE/IF Formula for specified and unspecified text in cells

    I'm looking for a formula that can recognise specified text and then any text that follows that is not in the specified parameters is replaced with the specified text.

    So for example the recognised text will be

    Black
    Blue
    Brown

    If something not specified follows such as 'spot' it will be replaced with Mix.

    So

    'Black' the formula would return 'Black'

    'Black Spot' the formula would return 'Black Mix'

    I've attached a file in which recognises the specified text and will return that but lacks the function of replacing the unspecified text.


    I hope that explains it clearly, much appreciate the help.

    Thanks in advance.

    J
    Attached Files Attached Files

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: SUBSTITUTE/IF Formula for specified and unspecified text in cells

    Aasuming 2206 is O365 so try this in C3:

    Please Login or Register  to view this content.
    WBD
    Office 365 on Windows 11, looking for rep!

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

    Re: SUBSTITUTE/IF Formula for specified and unspecified text in cells

    Another option:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-29-2022
    Location
    Manchester, England
    MS-Off Ver
    Version 2206
    Posts
    8

    Re: SUBSTITUTE/IF Formula for specified and unspecified text in cells

    Thank you all, just wondering is there a way to have these formula's ignore anything after the second word?

    So it would only ever be 'colour' 'mix' so you wouldn't have black mix mix etc?

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

    Re: SUBSTITUTE/IF Formula for specified and unspecified text in cells

    Please try: (changes in red)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by HansDouwe; 11-14-2022 at 05:47 AM.

  6. #6
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: SUBSTITUTE/IF Formula for specified and unspecified text in cells

    I also worked on this a little more:

    Please Login or Register  to view this content.
    WBD

  7. #7
    Registered User
    Join Date
    07-29-2022
    Location
    Manchester, England
    MS-Off Ver
    Version 2206
    Posts
    8

    Re: SUBSTITUTE/IF Formula for specified and unspecified text in cells

    These work really well. I may need to alter more depending on what combinations occur. Thanks all for the help.

+ 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 Substitute/Replace Text
    By andrewc in forum Excel General
    Replies: 6
    Last Post: 04-21-2020, 09:58 AM
  2. [SOLVED] Macro to substitute cells with a certain string with other text
    By tisahardknocklife in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2017, 05:23 AM
  3. [SOLVED] Substitute formula condition from to text with numerical
    By silambarasan.J in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-25-2016, 05:41 PM
  4. Add text at the end of cell when using the SUBSTITUTE formula
    By tm-tom in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2016, 08:51 AM
  5. Can you increment text in a substitute text formula
    By Taupo58 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-20-2015, 03:45 AM
  6. How to use a substitute formula to substitute text entries to a different text entry
    By andybocchi in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-01-2010, 07:50 PM
  7. Replies: 5
    Last Post: 11-16-2009, 08:24 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