Copy problem in excel, please help me.

Hi everyone,
Now, i'm having a small problem with excel.
Here i have 2 cells with content as following:
cell1: world
cell2: hello
I want to create a cell2 with content as following
cell 2: hello world
I have used copy and paste functions in VBA but don't have result as i expect
I only received a result as following
cell2: world
Please help me.


Answer this question

Copy problem in excel, please help me.

  • kevinj

    Can you show us the code on how you do the copy and paste

  • GaryMcC

    Hi

    You can work directly with the cells in VBA. If your sheet is "Sheet1" and your cells are A1 and A2 the below code would give the expected result.

    Worksheets("Sheet1").Cells(2, 1).Value = Worksheets("Sheet1").Cells(2, 1).Value & " " & Worksheets("Sheet1").Cells(1, 1).Value


  • Copy problem in excel, please help me.