Solved

Concatenate items from different columns

Posted on 2013-06-02
2
188 Views
Last Modified: 2013-06-09
I'm trying to figure out how to add additional data from different columns. I currently have just column A being displayed. So I'm trying to concatenate additional information from other columns. Along with Column A, I would like to have Column C (Text String) and Column F (Number). I'm retrieving my data from worksheet "Detail" and my code is being run on sheet "Project-Calendar New".  Here is my vba code.


Private Sub Worksheet_SelectionChange(ByVal target As Range)
If Intersect(target, Range("A1:X400")) Is Nothing Then Exit Sub

If target.Count > 1 Then Exit Sub

Dim DataSheet As Range
Dim TargetFound As Range
Dim xRow As Integer
Dim MessageString
Dim exampleDate As Date

Dim target1 As Range
Set target1 = Range("B7:H400")

'This is where my data is coming from?
Set DataSheet = Worksheets("Detail").Range("A2:X400")
Set TargetFound = DataSheet.Find(ActiveCell.Value)

If Not TargetFound Is Nothing Then
xRow = TargetFound.Row

Set DataSheet1 = Worksheets("Detail").Range("A2:A1400")
Set TargetFound1 = DataSheet1.Find(ActiveCell.Value)
If TargetFound1 Is Nothing Then
      
   Exit Sub

Open in new window

0
Comment
Question by:Southern_Gentleman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
ID: 39215310
* There is a Concatenate() function.
* You can write a formula using the ampersand (&) concatenation operator
* I created a Better Concatenate Function and describe it in this article:
http:A_7811-A-Better-Concatenate-Function.html

*  You can do the concatenation in your routine and assign a new .Value property to some cell.
0
 

Author Closing Comment

by:Southern_Gentleman
ID: 39233697
It took a while to look at your project and implement but I figured it. Thanks again.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question