concatenate in macro

Mstest / Awrdacpi
December 28, 2010 at 13:00:31
Specs: Microsoft Windows XP Professional, 2 GHz / 958 MB
i am creating a macro where in I have a sheet for my Tracker and then another sheet as Database.

Basically the macro will transfer data from the Tracker Sheet to the Database Sheet. After transferring all inputs will be deleted. But I want to concatenate some columns in the Tracker Sheet. Example: on the Tracker Sheet, I want E8 and E10 when transferred to the Database be concatenated.

Tracker Sheet:
8 Completed
10 Date

This should be the result on Database Sheet:


See More: concatenate in macro

Report •

December 28, 2010 at 13:43:37
One way would be like this:

Sheets("Database").Range("A1") = _
  Sheets("Tracker").Range("E8") & Sheets("Tracker").Range("E10")

Another way would be like this:

 With Sheets("Tracker")
  Sheets("Database").Range("B1") = _
    .Range("E8") & .Range("E10")
 End With

There's probably many more ways to do it but the most efficient would depend on what else you are doing with the code.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

December 28, 2010 at 13:54:33
thank you..

Report •

Related Solutions

Ask Question