+ Reply to Thread
Results 1 to 18 of 18

concatenate cell value with substitute

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    concatenate cell value with substitute

    Dear all, concatenate cell value with substitute

     CELL B1     CELL C1      CELL D1
     BSE01	ETM2-0	0
     BSE01	ETM2-0	1
    i want like below in the cell A1 & A2 other then cell keeping as blank
     BSE01_0ETM2_MS-0
     BSE01_0ETM2_MS-1
    It is something like as
    A1=  B1&"_"&SUBSTITUTE(C1,"ETM2","")&"ETM2"&"_MS-"&D1
    Last edited by nur2544; 08-30-2014 at 12:54 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    Try this...
    Formula: copy to clipboard
    =B1&"_"&LEFT(C1,(FIND("-",C1)-1))&"_MS-"&D1
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    I have just noticed that there is an 0 in front of ETM2 in your solution. Is this always a zero, or is it the last digit in B1, which may be variable?

  4. #4
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    Hi Glenn Kennedy, thanks for replay , it is not working , its output is giving as

     BSE01_ETM2_MS-0
     BSE01_ETM2_MS-1
    but it should be

     BSE01_0ETM2_MS-0
     BSE01_0ETM2_MS-1
    i am having as below
    CELL B1     CELL C1      CELL D1
     BSE01	ETM2-2	0
     BSE01	ETM2-2	1
     BSE01	ETM2-3	0
     BSE01	ETM2-3	1
     BSE01	ETM2-4	0
     BSE01	ETM2-4	1
     BSE01	ETM2-5	0
     BSE01	ETM2-5	1
     BSE01	ETM2-6	0
     BSE01	ETM2-6	1
    Last edited by nur2544; 08-30-2014 at 12:50 PM.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    Same formula as post #5, but in a sheet.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    OK got it. I'll be back in 5 minutes...

  7. #7
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    your everything is ok, jut need to change work for below field
    if  ETM2-1 then it will be 1ETM2
    if  ETM2-25 then it will be 25ETM2
    if  ETM2-10 then it will be 10ETM2
    if  ETM2-9 then it will be 9ETM2

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    OK. Try this out...
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    ETM2 this common for all text. just remove dash(-) & after the numeric value keep in front of ETM2

  10. #10
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    yes now i got my desire output , thanks for that . one issue if cell having blank it returns to #VALUE! . i don't want to see this . it should be blank as the field having no data.

  11. #11
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    I was aware of this. See post # 3. To repeat. Is the "missing" zero, always a zero?

    If it is always a zero, this should be OK.
    Formula: copy to clipboard
    =B1&"_0"&LEFT(C1,(FIND("-",C1)-1))&"_MS-"&D1

  12. #12
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    no it will vary , See post # 4

  13. #13
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    i want as below

    BSE01_2ETM2_MS-0
    BSE01_2ETM2_MS-1
    BSE01_3ETM2_MS-0
    BSE01_3ETM2_MS-1
    BSE01_4ETM2_MS-0
    BSE01_4ETM2_MS-1
    BSE01_5ETM2_MS-0
    BSE01_5ETM2_MS-1
    BSE01_6ETM2_MS-0
    BSE01_6ETM2_MS-1

  14. #14
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    So.... if it is varying, where is it in your source text string?

    In this case: BSE01 ETM2-2 0

    What digit do you want to appear in front of "ETM" ? Is it the second 2 in ETM2-2?

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    Done. See attached. Modified formula (pink) now runs below your data and is blank.

    If that's it, can you mark the thread as solved and (preferably) say thanks by clicking the add Reputation button at the bottom of this post?
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    Hi Glenn Kennedy
    Yes it works perfectly & my requirements is 100% ok. You did excellent job for me , I really appreciate it . it will help me a lots , thanks for your valuable time…

  17. #17
    Forum Contributor
    Join Date
    06-08-2012
    Location
    BD
    MS-Off Ver
    Microsoft Office 2016
    Posts
    640

    Re: concatenate cell value with substitute

    Hi Glenn Kennedy,
    Yes it works perfectly & my requirements is 100% ok. You did excellent job for me , I really appreciate it . it will help me a lots , thanks for your valuable time…
    Last edited by nur2544; 08-30-2014 at 01:27 PM.

  18. #18
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: concatenate cell value with substitute

    You're welcome - which part of Bangladesh are you from? I've been in Dhaka four or five times and in Khulna once.

+ 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. Replies: 0
    Last Post: 08-15-2013, 01:52 PM
  2. [SOLVED] Concatenate & substitute problem
    By norm01 in forum Excel General
    Replies: 2
    Last Post: 03-08-2013, 11:31 AM
  3. Concatenate and substitute
    By kwrcst in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-03-2013, 05:14 PM
  4. How to embed SUBSTITUTE formula within CONCATENATE?
    By MF422 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-30-2012, 05:13 PM
  5. 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