+ Reply to Thread
Results 1 to 10 of 10

merge two cells into one with separator "="

  1. #1
    Registered User
    Join Date
    04-04-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    4

    merge two cells into one with separator "="

    Hello,

    Here is my problem. I have a notepad++ file that I need to translate. Below is an example of four lines.

    # Login
    username = User name
    password = Password
    login = Login

    But only the words after the = are to be translated. The words after the # signs are not to be translated.

    I opened the file using excel and added a separator = . Now this is what I have : It doesn't show up, but "User name" "Password" and "Login" (on the right hand side) are all in separate cells, in colum B. Column A has the # Login/username/password/login in different lines, and lined up with Column B. (I hope I'm clear)

    # Login
    username User name
    password Password
    login Login

    So this makes the translation process clear and simple, but I am worried about the reverse operation, of converting the two column format to a single column... and inserting the = sign in between...

    I hope this is clear... and I hope you can help!!!
    Thanks!
    Cynthia

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: merge two cells into one with separator "="

    wouldnt putting them back together be (inC2)=A2&" = "&B2

  3. #3
    Registered User
    Join Date
    04-04-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: merge two cells into one with separator "="

    and where would I put that formula?

    I forgot to say... I am a baby with Excel... just the basics

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: merge two cells into one with separator "="

    So let me get this clear. You can open the Notepadd++ file and you can get it into the format in Excel that you want?

    Now you want to put it back as was, assuming you will have manipulated that data somehow,someway, so that all columns without # get concatenated with =.

    If so, try this code

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: merge two cells into one with separator "="

    that is in C2

    example

    1----A--------B--------C
    2User N-------PW-------
    3fred---------1234-----=A3&" = "&B3
    4bob----------5678----=A4&" = "&B4

  6. #6
    Registered User
    Join Date
    04-04-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: merge two cells into one with separator "="

    So I got it, but what your formula does is puts an equal sign for all lines, whether or not they need it :

    # Login =
    username = User name
    password = Password
    login = Login

  7. #7
    Registered User
    Join Date
    04-04-2012
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: merge two cells into one with separator "="

    Bob,
    where do i put that code?????????

  8. #8
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    964

    Re: merge two cells into one with separator "="

    i have uploaded a sheet does this help?

    merge.xlsx

  9. #9
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: merge two cells into one with separator "="

    Quote Originally Posted by infact View Post
    Bob,
    where do i put that code?????????
    In a code module. Hit Alt-F11, goto Insert>Module and add it there. You need the Developer tab to be visible to run it.

  10. #10
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: merge two cells into one with separator "="

    Actually you can do an Alt-T-M-M to get to the macro list without the Developer tab.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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