How to ? in MS-Excel

India
December 31, 2009 5:24am CST
I have data in excel and i want to merge the data of two cell into one third cell by formula. What is the proper way to do the task?
1 person likes this
2 responses
@owlwings (43910)
• Cambridge, England
31 Dec 09
If the data is text, the proper formula is =CONCATENATE([cell 1], [cell 2] ... ). You can also do this using the ampersand operator (&) as follows: =[cell 1]&[cell 2]. If the data is numerical, you may need to format it as text using the =TEXT function. With this, you need to specify the cell and the format in double quotes as follows: =TEXT([cell ref], [format string in double quotes]) You may also want to get rid of leading and trailing spaces using the TRIM function. When concatenating text (or numbers or dates as text), you may want to add commas or spaces or other punctuation. This can be done 'inline' by including a text string in double quotes. Suppose that you had three fields: A1 - First Name (text), B1 - Surname (text), C1 - Date of Birth (date) which you wanted to turn into one string with the Surname first followed by the First Name and with the date after a colon as "day, short month, full year in another cell" (D1). In D1 you might put the following formula: =TRIM(B1) & ", " & TRIM(A1) & ": " & TEXT(C1, "d mmm yyyy") For further understanding of how these functions work and are formatted, look at the Help for each one.
@owlwings (43910)
• Cambridge, England
31 Dec 09
Although CONCATENATE is the 'old' function (it was compatible with LOTUS 123 and other earlier spreadsheet programs), the & operator is rather more flexible.
• Philippines
31 Dec 09
thumbsup owlwings! happy new year
@b4balaji (410)
• India
31 Dec 09
If you are asking for the formula to concatenate text, then it is the & symbol. For example if you want to concatenate contents of cell a1 and b2, then all you have to do is in the cell c3 type the following contents. a1&""&b1. As you can see, the symbol ampersand is the concatenation operator to merge two cells.