Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a data in Column A1 some data and I want to combine data from Column B1, D1 and E1 to Coumn A1, how do I do it using macro in excel 2003.

share|improve this question
    
Are you sure you want a macro to do this? As Dave Rook has shown below, it can be accomplished using a CONCATENATE formula. –  CharlieRB Sep 6 '12 at 11:40

1 Answer 1

You can use use CONCATENATE()

See this screen shot:

enter image description here

Further details on the Microsoft Office website.

I use this a lot and it's very powerful as it's not limited to text between each comma, you can put in other functions, such as this silly example (you can apply this to the screenshot above, pasting the code into cell C1):

=CONCATENATE(IF(HOUR(NOW()) < 12, CONCATENATE("Morning and ", A1, " to"), A1), " ", B1)

share|improve this answer
    
Your answer is correct, and the way I would do it, but the question asks for the results to be in A1 along with the data which already exists there. You may want to add inserting a column at A in order to completely answer the question. –  CharlieRB Sep 6 '12 at 11:38
    
@CharlieRB, thank you for pointing this out. However, I don't think it's possible. If you know a way, please feel free to answer separately. –  Dave Sep 6 '12 at 11:45
    
I don't think it's possible unless you enter the value of A1 into the concatenation - this would fail if the formula had to be copied due to the hard coding. –  Dave Sep 6 '12 at 11:57
    
Agreed. The user is going to have to insert a column in order to achieve what they desire of having it in the first column. –  CharlieRB Sep 6 '12 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.