+ Reply to Thread
Results 1 to 3 of 3

Help with a Concatenate and Substitute formula

Hybrid View

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    Prague
    MS-Off Ver
    M365, version 2304
    Posts
    40

    Help with a Concatenate and Substitute formula

    Hi all

    I am trying to create a formula which will concatenate certain text and data, but which will also substitute some of the backslashes out into underscores. So, I've got as far as:

    =SUBSTITUTE(CONCATENATE("\\servername",A2,".txt"),"\","_")

    The issue is that I wish to change the backslashes in cell A2 to underscores, but I need to keep the backslashes in the "\\servername" part. Is there a possibility to do this at all?


    Thank you!

  2. #2
    Valued Forum Contributor PaulSP8's Avatar
    Join Date
    11-21-2017
    Location
    Chorley, England
    MS-Off Ver
    2013 & 2021
    Posts
    437

    Re: Help with a Concatenate and Substitute formula

    Would a simple rejig work for you?

    Formula: copy to clipboard
    ="\\servername"&SUBSTITUTE(A2,"\","_")&".txt"

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    Prague
    MS-Off Ver
    M365, version 2304
    Posts
    40

    Re: Help with a Concatenate and Substitute formula

    Like a charm. Thank you so much!

+ 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] concatenate cell value with substitute
    By nur2544 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 08-30-2014, 01:37 PM
  2. Replies: 0
    Last Post: 01-09-2014, 04:52 PM
  3. Replies: 0
    Last Post: 08-15-2013, 01:52 PM
  4. [SOLVED] Concatenate & substitute problem
    By norm01 in forum Excel General
    Replies: 2
    Last Post: 03-08-2013, 11:31 AM
  5. Concatenate and substitute
    By kwrcst in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 05:14 PM
  6. How to embed SUBSTITUTE formula within CONCATENATE?
    By MF422 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2012, 05:13 PM
  7. combining substitute and concatenate
    By sackling in forum Excel General
    Replies: 3
    Last Post: 02-21-2010, 03:03 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