+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Copying text of cell A to cell B, depending on value of cell C?

  1. #1
    Registered User
    Join Date
    02-11-2010
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2007
    Posts
    83

    Copying text of cell A to cell B, depending on value of cell C?

    I'd like to be able to add the text of cell A in worksheet A, to cell B (read concatenate to text already in cell B) in worksheet B, when cell C in worksheet B = a specific value.

    If the above description is as clear as mud, let me know and I'll see if I can do better.

    Thanks,

    Rob

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

    Re: Copying text of cell A to cell B, depending on value of cell C?

    The key part is "concatenate to text already in cell B" - this would require VBA.

    The next question is then how the value in cell C is altered ? Is it manual entry or formula result ? If it is a formula please outline the formula itself such that we can work back to the first manual precedent.

  3. #3
    Registered User
    Join Date
    02-11-2010
    Location
    Maryland, USA
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Copying text of cell A to cell B, depending on value of cell C?

    Quote Originally Posted by DonkeyOte View Post
    The key part is "concatenate to text already in cell B" - this would require VBA.
    Sigh. I knew I should have learned VBA when I had the time. Sadly, I'm far to busy to really learn it now. The value in cell C is a manual entry string. How complex is the requisite VBA? I can generally understand code if someone can start me in the right direction. I'd really appreciate all the help I can get.

    Thanks again,

    Rob

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

    Re: Copying text of cell A to cell B, depending on value of cell C?

    You would use the Change event of the parent sheet object - test to see if the cells altered are in Column C and if so what their respective values are - in turn adjusting B as stated.

    For a generic and totally untested example:

    Please Login or Register  to view this content.
    to insert the above right click on sheet to which the above is to be applied - select View Code and paste above into resulting window.
    Thereafter in a macro enabled file altering value in C to "X" should adjust the string in B such that it appends the present value in A to it.
    Last edited by DonkeyOte; 08-18-2010 at 02:31 AM. Reason: edit: added LTrim

+ 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