Question:
How do I combine adjacent cells from two different columns in MS Excel?
2007-12-14 09:34:59 UTC
I need to combine characters from two different columns - the second column needs to be added to the characters in the 1st column. For example, column A has cells containing the letter
G" and column B has cells containing letter "H". I need to combine the two columns so that the cells in column A now read "GH". How can I do this? Is there a formula I can use?
Three answers:
2007-12-14 09:42:18 UTC
The formula would be:

=A1&B1

Quite simply!



If you need to add something in between, such as a space, then do this instead:

=A1&" "&B1

Note the space between the quotes. You can replace that space with pretty much anything you want.



Edit: make sure you do not delete the contents of columns A or B as you would then lose the corresponding content in the 3rd column where you have the combined columns.

If you want to combine the two, then get rid of the two source columns, do the above, select the third column, copy, go to a 4th column, do Edit | Paste Special and pick Values. Now you can get rid of columns A and B safely.
ferrell
2016-11-03 10:21:04 UTC
Edit: do no longer forget that each and every cellular in column A ought to evaluate against each cellular in column B to verify if there is not any tournament. So.... you will in fact be processing: seventy 3,764 cells each and every against seventy 3,864 cells or 5,448,504,096 computations ( confident, 5 BILLION). If it stops responding each and every time you call it, it ought to easily be too plenty for Excel to attend to (or a awful macro :) end edit: ============== ok... we will supply it yet another go. attempt this macro. replica the macro to the clipboard: Sub Append_and_Reset() Dim i, LastRowA, LastRowB, dMarc LastRowA = variety("A" & Rows.count variety).end(xlUp).Row LastRowB = variety("B" & Rows.count variety).end(xlUp).Row application.ScreenUpdating = fake For i = LastRowA to a million Step -a million If application.CountIf(variety("B:B"), Cells(i, "A")) = 0 Then Cells(i, "A").replica variety("A" & LastRowA).Offset(a million, 0).pick ActiveSheet.Paste Cells(i, "A").Delete end If next For i = LastRowB to a million Step -a million If application.CountIf(variety("A:A"), Cells(i, "B")) = 0 Then Cells(i, "B").replica variety("B" & LastRowB).Offset(a million, 0).pick ActiveSheet.Paste Cells(i, "B").Delete end If next For i = a million To LastRowA If application.CountIf(variety("B:B"), Cells(i, "A")) = 0 Then dMarc = Cells(i, "A").Row go out For end If next For i = a million To dMarc - a million Cells(i, "B").cost = Cells(i, "A").cost next end Sub Press ALT + F11 interior the menus on the suitable of the VBE, pick INSERT > MODULE Paste the macro into the module modifying section to the excellent. close the VBE and return to Excel. Press ALT + F8 while the Macros window opens, spotlight this macro and click 'suggestions..' enter a letter for use as a keyboard shortcut and click 'ok'. close the Macros window. Press CTRL + your letter to run the macro. be conscious: this macro has been examined with distinctive archives gadgets and applications as your question states it is going to to return the needed result. whether, in case you like to backup your archives first, please gain this.
george_sdj
2007-12-14 11:37:35 UTC
press merge and center


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...