Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Nov 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Combine 2 Cells (Excel 2003)

    I'm writing a macro for Excel 2003 that takes values from one cell and inserts them into other cells in a different order. As part of this process, I would like to combine the contents of two cells (say D27 and E27) into one of those two cells (D27). Every way I've tried to do this isn't working. I know you can concatenate cells using a formula in the cell, so I thought about just using VBA to insert the formula into the cell, but then I'm still left with the values in the old cells, which is a bit clunky. Plus, the way I've got it set up now, it would be a circular formula, because I am inserting the final value into one of the two cells that I am pulling the value from.

    Any ideas?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Combine 2 Cells (Excel 2003)

    Since you're writing code anyway, you could set the value of the cells instead of using a formula.

    Range("D27") = Range("D27") & Range("E27")
    Range("E27") = ""

  3. #3
    Star Lounger
    Join Date
    Nov 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    87
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Combine 2 Cells (Excel 2003)

    Perfect! Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •