Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-05-2016, 12:02 PM
inreality01 inreality01 is offline Append / "Add" two text columns together Windows 7 64bit Append / "Add" two text columns together Office 2013
Advanced Beginner
Append / "Add" two text columns together
 
Join Date: Dec 2015
Posts: 34
inreality01 is on a distinguished road
Default Append / "Add" two text columns together

I want to take two columns that both contain text data and make a new column that includes all of the data for both columns.

This seems like a simple chore but it is eluding me so far.



I find info on concatenating data, merging data, etc. but nothing on simply combining the data of two columns......... so if I have 10 entries in one column and 10 in another the resulting column will have all 20.

I appreciate anyone being able to assist after they stop laughing that I can't figure it out.
Reply With Quote
  #2  
Old 01-05-2016, 03:06 PM
gebobs gebobs is offline Append / "Add" two text columns together Windows 7 64bit Append / "Add" two text columns together Office 2010 64bit
Expert
 
Join Date: Mar 2014
Location: Atlanta
Posts: 837
gebobs has a spectacular aura aboutgebobs has a spectacular aura about
Default

OIC...yeah, there's a way to do that. It takes code. Here is one I made with a lot of help from one of the code gurus here. For the data selected in multiple columns, this will put them all in another column with a blank column between and sort the results. You can delete the sort or change the output column as you see fit.

Code:
Sub Unwind()

  Dim OutCell As Range
  Ctr = 0
  
  Set OutCell = Selection.Cells(1, 1).Offset(0, Selection.Columns.Count + 1)
  
  For Each Cell In Selection
    OutCell.Offset(Ctr, 0).Value = Cell.Value
    Ctr = Ctr + 1
  Next Cell
  
  ActiveWorkbook.Worksheets("Totaler").Sort.SortFields.Clear
  ActiveWorkbook.Worksheets("Totaler").Sort.SortFields.Add Key:=Range("F1"), _
    SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    
  With ActiveWorkbook.Worksheets("Totaler").Sort
    .SetRange Range("F1:F10709")
    .Header = xlNo
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
  End With
  
  Selection.End(xlUp).Select
  
End Sub
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spreadsheet with "CR" & "DB" in amount & number columns. bfisher Excel 4 09-28-2015 07:03 AM
remove repeated words with " macro " or " wild cards " in texts with parentheses and commas jocke321 Word VBA 2 12-10-2014 11:27 AM
How to edit the "Format" and the "show level" of an EXISTING table of content? Jamal NUMAN Word 2 08-14-2011 10:46 AM
Append / "Add" two text columns together How to choose a "List" for certain "Heading" from "Modify" tool? Jamal NUMAN Word 2 07-03-2011 03:11 AM
"Microsoft Excel Application" missing in the "Component Services" on win08 sword.fish Excel 0 02-26-2010 02:09 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft