+ Reply to Thread
Results 1 to 7 of 7

Forula needed to replace a word in one column with another word in a different cell

  1. #1
    Registered User
    Join Date
    02-24-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Forula needed to replace a word in one column with another word in a different cell

    in excel i want to replace the word bebo with a value in cell B1
    this is the line
    CREATE TABLE IF NOT EXISTS `bebo` ( `id` int(10) NOT NULL auto_increment,`beboid` varchar(255) default '0',`status` varchar(255) default 'No Comment Posted',PRIMARY KEY (`id`))

    in column B i have a load of values
    so i need an excel formula to replace bebo
    so that it will take values from B1 to B26
    any ideas please?
    Last edited by kevinkhan; 02-24-2010 at 06:43 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Forula needed to replace a word in on column with another word in a different cel

    Sorry, I'm not sure I understand. What is that code you have there? Is that the string where you want to replace "bebo"?

    If that string is in A1, use

    =substitute(A1,"bebo", B1)

  3. #3
    Registered User
    Join Date
    02-24-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Forula needed to replace a word in on column with another word in a different cel

    Quote Originally Posted by teylyn View Post
    Sorry, I'm not sure I understand. What is that code you have there? Is that the string where you want to replace "bebo"?

    If that string is in A1, use

    =substitute(A1,"bebo", B1)

    No this line is in cell A1
    CREATE TABLE IF NOT EXISTS `(=B1)` ( `id` int(10) NOT NULL auto_increment,`beboid` varchar(255) default '0',`status` varchar(255) default 'No Comment Posted',PRIMARY KEY (`id`))

    and i want to replace the string "bebo" with what ever is in B1 and then when thats done i want to drag column A1 down to A2 A3 A4 etc replacing bebo with the values in B1 B2 B3 B4 etc..

    Can this be done?

  4. #4
    Registered User
    Join Date
    02-24-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Forula needed to replace a word in on column with another word in a different cel

    Quote Originally Posted by teylyn View Post
    Sorry, I'm not sure I understand. What is that code you have there? Is that the string where you want to replace "bebo"?

    If that string is in A1, use

    =substitute(A1,"bebo", B1)
    ok thanks that worked but it also replace the "beboid" as well which i dont want to happen

    CREATE TABLE IF NOT EXISTS `bebo` ( `id` int(10) NOT NULL auto_increment,`beboid` varchar(255) default '0',`status` varchar(255) default 'No Comment Posted',PRIMARY KEY (`id`))

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Forula needed to replace a word in one column with another word in a different ce

    Use "`bebo`" not "bebo" in the Substitute.

  6. #6
    Registered User
    Join Date
    02-24-2010
    Location
    Ireland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Forula needed to replace a word in one column with another word in a different ce

    Quote Originally Posted by DonkeyOte View Post
    Use "`bebo`" not "bebo" in the Substitute.
    ok thanks..

    any ideas how to type this ` symobol as appose to this symbol '

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Forula needed to replace a word in one column with another word in a different ce

    If you x-post have the courtesy to provide links accordingly.

    http://www.mrexcel.com/forum/showthread.php?t=450638

+ 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