+ Reply to Thread
Results 1 to 6 of 6

How to remove the content of one cell and replace it with the content of another

  1. #1
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    How to remove the content of one cell and replace it with the content of another

    Hey all,
    In this formula:

    Please Login or Register  to view this content.
    what happens is I'm trying to replace this:

    SUBSTITUTE(A1,A1,B1)

    with an excel formula that won't substitute the content in the column which this function is called, but will rather replace all the content of cell A1 with all the content of cell B1 leaving B1 completely empty.

    I tried the REPLACE but it only gave me some kind of #REF value.

    Thanks for response.

  2. #2
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: How to remove the content of one cell and replace it with the content of another

    This not possible to do with formulas? Will I be required to use VBA?

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

    Re: How to remove the content of one cell and replace it with the content of another

    I's not clear where the formula posted resides but if you're saying you want to Cut B1 to A1 then yes you would be required to use VBA (sub routine)

    You will need to post back with more info. if that is indeed the requirement.

  4. #4
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: How to remove the content of one cell and replace it with the content of another

    So I made this macro myself:

    Please Login or Register  to view this content.
    It seems to work, but obviously it is only targeting the first cell. Can anyone help with how I can get it to iterate through column A as long as a cell in Column A has content?

    Thanks for response.

  5. #5
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: How to remove the content of one cell and replace it with the content of another

    I was hoping that this part:

    LR = Range("A" & Rows.Count).End(xlUp).Row


    would make it loop through the length of the contents of column A but it's not working.

    Thanks for response.

  6. #6
    Forum Contributor
    Join Date
    09-19-2010
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2007
    Posts
    140

    Re: How to remove the content of one cell and replace it with the content of another

    got it working - had to reference "i" in loop.
    Last edited by johnmerlino; 01-28-2011 at 08:41 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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