Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Concatenate items from different columns

Posted on 2013-06-02
2
Medium Priority
?
197 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 46

Accepted Solution

by:
aikimark earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

722 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