Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 226
Default Returning multiple text data into 1 column from many column entrie

Hi.
I have a large worksheet that contains records of avtivities from record 3
and onwards with logic link predecessors to other activities in columns E
through IT.

I want Excel to identify where there is a logical link represented by an
Integer number in columns E though IT and return the cell data into column D
record by record as indicated below.
Where there is more than 1 entries in columns E through IT the returned data
in column D needs to be separated by a comma.
Preferrably I would like to avoid having a comma at the end if possible.

I would appreciate if someone could give me some help on this issue.

D E F G H

2,3,4 2 3 4
2 2
3,4 3 4
1,3 1 3
4 4


--
The Oilman
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 896
Default Returning multiple text data into 1 column from many columnentrie

you might use this UDF. Press ALT+F11 to go to VBA, then click Insert-
Module and copy/paste this code.

then go to D1 and insert: =link(D1)


Function link(cel As Range) As String
Dim counter As Integer

For Each cell In Range("E" & cel.Row & ":IT" & cel.Row).Cells
If Len(cell.Value) Then
counter = counter + 1
If counter 1 Then
tekst = tekst & "," & cell.Value
ElseIf counter = 1 Then
tekst = cell.Value
End If
End If
Next cell

link = tekst

End Function




On 4 Mar, 06:59, Roger wrote:
Hi.
I have a large worksheet that contains records of avtivities from record 3
and onwards with logic link predecessors to other activities in columns E
through IT.

I want Excel to identify where there is a logical link represented by an
Integer number in columns E though IT and return the cell data into column D
record by record as indicated below.
Where there is more than 1 entries in columns E through IT the returned data
in column D needs to be separated by a comma.
Preferrably I would like to avoid having a comma at the end if possible.

I would appreciate if someone could give me *some help on this issue.

D * * * E * * * F * * * G * * * H

2,3,4 * * * * * 2 * * * 3 * * * * * * * 4
2 * * * * * * * 2 * * *
3,4 * * * * * * * * * * 3 * * * * * * * 4
1,3 * * 1 * * * * * * * 3
4 * * * * * * * * * * * * * * * * * * * *4

--
The Oilman


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Plotting multiple Y column data versus single X column in Excel 20 RossM Charts and Charting in Excel 3 June 28th 09 01:39 AM
Returning multiple values that are NOT in a single column or row crispino Excel Worksheet Functions 8 April 24th 09 02:45 AM
Lookup returning value from antoher column in same row (Text!) Cube Zombie Excel Discussion (Misc queries) 3 February 15th 08 08:19 PM
stacking multiple column data into a single column Chubby Excel Worksheet Functions 1 January 12th 07 07:24 AM
text import all in one column. how do I set it to multiple column maggie Hettinger New Users to Excel 2 April 10th 06 04:49 PM


All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"