Which of the following features combines two or more cells into one cell?
When you combine the cells from multiple columns or rows into a single cell, the combined data may be separated by nothing. But if you want to separate them with specified marks, such as space, commas, semicolon or others, how can you do? This tutorial will introduce some methods for you. Show
Concatenate row or column of cells into one cell with space, comma or other separators by using formulasIn Excel, you can use the below formulas to combine a row of cells or a column of cells into a single cell. Method A: Use "&" operator to combine cellsIn Excel, you can use the "&" operator to combine different text strings or cell values. Please enter the below formula to concatenate the cells in multiple columns: (separate the combined results with space, you can replace the blank with other separators as you need.) =A2&" "&B2&" "&C2 And then, drag the fill handle down to the cells that you want to apply this formula, and the data from different columns have been merged into one cell, see screenshot:
Method B: Use Concatenate function to combine cellsThe Concatenate function in Excel is also used to join multiple text strings or cell values into one cell. Please enter or copy the below formula into a blank cell: =CONCATENATE(A2, "-", B2, "-", C2) And then, drag the fill handle down to the cells that you want to apply this formula, you will get the following result:
Method C: Use Textjoin function to combine cellsIf you have Excel 365 and later versions, there is new function-Textjoin, this function also can help you to combine multiple cells into one cell. Enter or copy the following formula into a blank cell: =TEXTJOIN(",",TRUE,A2:C2) Then, drag the fill handle to apply this formula to other cells, see screenshot:
Concatenate row, column or range of cells into one cell with a specified separator Kutools for Excel supports a powerful feature-Combine which can help you to merge all data based on rows, columns or a range of cells into one record without losing data. Please see the below demo. Click to download Kutools for Excel! Concatenate row or column of cells into one cell with space, comma or other separators by the User Defined FunctionIn Excel, you can also create a User Defined Function to combine cells of row or column into a single cell with spaces or specified marks. 1. Hold ALT + F11 keys on the keyboard to open a Microsoft Visual Basic for Application window. 2. Click Insert > Module, and copy the VBA into the module. VBA: Combine cells based on row or column into one with specific separator:
Tip: In the above script "Function Combine(WorkRng As Range, Optional Sign As String = "~") As String", the separator "~" is specified to separate the combined result, you can change it to meet your need. 3. Then please type formula =Combine(A2:C2) in a blank cell, and then drag the fill handle over the range that you want to apply this formula, all of the cells in the row will be combined into a cell with dashes. See screenshot: Tips: With above User Defined Function, you can also combine cell values based on column, you just need to enter this formula =Combine(A2:A7) to get the merged data as you need. Concatenate row or column of cells into one cell with line break by using formulasSometimes, you may want to use the line break to separate the concatenated text string, normally, the CHAR(10) will return the line break character. Here, you can use the below methods to solve this task: Method A: Use Concatenate function to combine cells with line breakHere, you can combine the concatenate function with the Char(10) character together to get the merged result which is separated by line break. 1. Please type or copy the below formula: =CONCATENATE(A2,CHAR(10),B2,CHAR(10),C2) Then, drag the fill handle down to the cells you want to apply this formula, and you will get the following result: 2. Then, you should click Home > Wrap Text to format the cells, and then, you will get the result as you need: Tips: To combine the cell values from multiple rows, you just need to change the cell reference as this: =CONCATENATE(A2,CHAR(10),A3,CHAR(10),A4,CHAR(10),A5,CHAR(10),A6,CHAR(10),A7) Method B: Use Textjoin function to combine cells with line break (Excel 365 and later versions)May be the above formula is somewhat difficult if there are multiple cells needed to be combined, so, the Textjoin function can deal with this task quickly and easily. Please enter or copy the below formula into a blank cell: =TEXTJOIN(CHAR(10),TRUE,A2:C2) After getting the combined results, please remember to format the formula cells to Wrap Text, see screenshot: Tips: To combine the cell values from multiple rows, you just need to change the cell reference as this: =TEXTJOIN(CHAR(10),TRUE,A2:A7) Concatenate row, column or range of cells into one cell with specified separator by using a wonderful featureIf you are annoying with the above formulas and code, here, I can recommend a useful tool- Kutools for Excel, with its Combine feature, you can quickly combine cell values by row, column or a range into one single cell. Tips:To apply this Combine feature, firstly, you should download the Kutools for Excel, and then apply the feature quickly and easily. After installing Kutools for Excel, please do as this: 1. Select a range cell values that you want to combine into a cell. 2. Please apply this function by clicking Kutools > Merge & Split > Combine Rows, Columns or Cells without Losing Data. See screenshot: 3. In the popped out dialog box, please specify the operations you need as following screenshot shown: 4. Then, click Ok, you will get the result as below screenshot shown: 1). Combine cell values into one cell for each row: 2). Combine cell values into one cell for each column: 3). combine a range of cell values into one single cell: Click to Download Kutools for Excel and free trial Now! More relative combine rows and columns articles:
The Best Office Productivity ToolsKutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%
Read More... Full Features 30-Day Free Trial... Purchase... Office Tab - brings tabbed interface to Office, and make your work much easier
Read More... Full Features 30-Day Free Trial... Purchase...
Oldest First Sort comments by Oldest First Newest First Comments (34) No ratings yet. Be the first to rate! Raghad about 8 years ago This comment was minimized by the moderator on the site Thank you a lot. I found this very useful. Regards, Raghad Reply 0 0 Charuta about 8 years ago This comment was minimized by the moderator on the site awesome: helped with my project and saved many hours of work...thanks much. Reply 0 0 fmanjeim about 8 years ago This comment was minimized by the moderator on the site Great, limpidly clear Reply 0 0 Zygis about 8 years ago This comment was minimized by the moderator on the site Thank you. This was really a savior! I have one question. I want to merge EAN codes. It works like a charm in the same sheet. But when I take EAN codes from another sheet, I get the result: #######,########,#######,####### Where might be the problem? many thanks Reply 0 0 admin_jay about 8 years ago This comment was minimized by the moderator on the site Hello, please be more specific about your issue. Try to contact me at jaychivo#extendoffice.com. Please replace # with @. :-) Reply 0 0 Kristi admin_jay about 5 years ago This comment was minimized by the moderator on the site Hi! I have a spreadsheet of over 23,000 serial numbers in Column A, then each serial number has a one-digit Assign number in Column B, and finally an individualized Application number that belongs to both the serial number and assigned number in Column C. Looks like this: A B C 123456 1 1212121 987655 2 5656565 606060 1 4343434 606060 1 8989898 How would I combine just the rows of data that have the SAME Serial number and Assign number but different application numbers using a comma? Such as, I need: 606060 1 4343434, 8989898 Any help would be super appreciated!!! Reply 0 0 Annette about 8 years ago This comment was minimized by the moderator on the site I used your VBA formula a few days ago and it worked beautifully. I'm using it again today and I keep getting a #NAME? error. I've tried all sorts of things and can't get it to work. What am I doing wrong? Reply 0 0 Srina about 7 years ago This comment was minimized by the moderator on the site Hi, thanks so much for the helpful resource!!! May I ask how to modify the VBA Module to have both "," and " "? Thank you so much! Reply 0 0 Srina Srina about 7 years ago This comment was minimized by the moderator on the site [quote]Hi, thanks so much for the helpful resource!!! May I ask how to modify the VBA Module to have both "," and " "? Thank you so much!By Srina[/quote] Most of all, how to end the list with no space and no comma? So to select entire rows of a spreadsheet as resource, which might include a different number of columns? Please help, as Kutools is not compatible with Mac. Thanks in advance! Reply 0 0 Pradeep about 7 years ago This comment was minimized by the moderator on the site Thanks for the VBA code!!!!It saved my time......... :-) Reply 0 0 sandeep melwan about 7 years ago This comment was minimized by the moderator on the site i want to merage two cells with the following results A and B = A ,B means A column space comma B column Reply 0 0 R Hammer about 7 years ago This comment was minimized by the moderator on the site Thank you. That is the best explanation I have found yet! I am having trouble expanding this over hundreds of columns though. Can you clarify the point where you say "Dragging the fill handle over the range that you want to apply this formula, all of the cells in a row will be combined into a cell with commas" I am not sure how to do this. Reply 0 0 Subbu about 7 years ago This comment was minimized by the moderator on the site Thanks a lot.. this info is very helpful. Reply 0 0 cara about 7 years ago This comment was minimized by the moderator on the site I am having issues, the cells G2-N2 (down thousands of rows) need to be merged to one column using a comma but no space between them. However, if the cell is EMPTY, it needs to SKIP the cell, with no input of a comma. I cannot find any HELP menu for this and I am up against a deadline and need this shortcut for thousands of products I am importing. Any and all help appreciated. Reply 0 0 Oscar Bolanos about 7 years ago This comment was minimized by the moderator on the site Thanks for the macro, it worked great!! Reply 0 0 Sawan Sharma about 6 years ago This comment was minimized by the moderator on the site Thanks a ton VBA save my hours....!!! Reply 0 0 Mark about 6 years ago This comment was minimized by the moderator on the site How do i get results show the following values: A B C 10 10 =CONCATENATE(A1,",",B1,",",C1) RESULTS 10,,10 10 20 30 =CONCATENATE(A1,",",B1,",",C1) RESULTS 10,20,10 10 30 =CONCATENATE(A1,",",B1,",",C1) RESULTS 10,30, ABOVE IT IS SHOWING COMMA IN BETWEEN TWO VALUES OR AFTER. I DONT WANT THE COMMA WHERE THE VALUE IS NOT THERE Reply 0 0 Rob Mark about 5 years ago This comment was minimized by the moderator on the site Try this. =SUBSTITUTE(IF(A1="","",A1&",") & IF(B1="","",B1) & IF(C1="","","," & C1),",,",",") Reply 0 0 laura about 6 years ago This comment was minimized by the moderator on the site the merge formula was great, except one of my columns of data were dates, and the dates had to be formatted MM/DD/YY - but once merged, the date converted to a decimal figure. I couldn't use the formula. Reply 0 0 Charles about 6 years ago This comment was minimized by the moderator on the site The VBA macro worked very well after I adjusted for the my cell locations and I was able to add a space after the comma for a better display of the data. Reply 0 0 Jake about 6 years ago This comment was minimized by the moderator on the site The VBA code worked really well thanks. My only issue is that it is including blanks so that my combined output ends up looking like this: "test, test, , , , , , test" How could I get it to exclude blank cells within the range? Reply 0 0 Kashish Garg Jake about 5 years ago This comment was minimized by the moderator on the site If you found the answer let me now please as well. Reply 0 0 Carontoc Kashish Garg about 5 years ago This comment was minimized by the moderator on the site instead of the line in the original code: Reply 0 0 Sandeep K about 5 years ago This comment was minimized by the moderator on the site how to combine 2 cell with space in between with 2 independent cell format. Eg. If one cell is Red digits & other cell has digits in green, it should combine with Red & green digits. Reply 0 0 Smithc114 about 5 years ago This comment was minimized by the moderator on the site I genuinely enjoy studying on this website, it holds good content. Never fight an inanimate object. by P. J. O'Rourke. dfdkbafbadfkagdd What combining two or more cells in one cell?You can combine data from multiple cells into a single cell using the Ampersand symbol (&) or the CONCAT function.
How to merge two cells in Excel?Merge Multiple Cells. Hold left click and select the cells that will merge. Step 2: Go to the “Home” tab. Find the “Merge” icon and click. ... . Select Merge Across. The cells in the row will merge.. The selected cells merge. Merge Cells Option. ... . Use Merge Cells option to combine adjacent cells. Merge & Center.. Which option is used to combine multiple cells?Select the range in your worksheet or use the Expand selection or Select range icons on the right. In this dropdown, choose the merging option: Columns into one, Rows into one, Cells into one. Combine with offers a set of standard delimiters to use between the merged values: semicolon, comma, period, space, line break.
Which operator is used to combine two values in one cell?The ampersand (&) calculation operator lets you join text items without having to use a function. For example, =A1 & B1 returns the same value as =CONCATENATE(A1,B1).
|