+ Reply to Thread
Results 1 to 3 of 3

replacing a word/variable in one cell with the value in another cell

  1. #1
    Registered User
    Join Date
    12-13-2010
    Location
    Charlotte
    MS-Off Ver
    Excel 2003
    Posts
    6

    replacing a word/variable in one cell with the value in another cell

    I am trying to create a macro to speed up a process I am doing. I want to replace a variable in Cell A2 with the value in cell B2 (and possibly a different variable with cell c2)

    Sentence FirstName LastName Output
    I am friends with %FirstName%. John I am friends with John.
    %FirstName% is from the %LastName% Family John Smith John is from the Smith Family


    I have been trying to use some macros I have found online, but nothing seems to work.


    Thanks in advance for any help.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: replacing a word/variable in one cell with the value in another cell

    No macros, just some simple formulae...for the 1st one use -
    Please Login or Register  to view this content.
    For the 2nd one -
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    12-13-2010
    Location
    Charlotte
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: replacing a word/variable in one cell with the value in another cell

    Thanks. I forgot to add. the content in column a will vary so I wont be able to use a concatenate function. eg:

    %firstname% is my friend and has a last name of %lastname%
    %firstname% %lastname% is my friend

    etc

+ 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