Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Concatenate Cells

I am having trouble with a formula to concatenate the descriptions into 1
cell for each S/C #, some have 2, 3 of 4 cells.

Material No. Full Description
904120016 VALVE,SOLENOID, 240V 50HZ, HERION, P/N
9301800-0201, FOR GAS SAFETY SHUT OFF AND VENT
BALL VALVES, ON ALUMINA KILNS
907010005 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER,
BLACK, PVC / V75, .6 / 1KV, 100M ROLL
907010006 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER, RED,
PVC / V75, .6 / 1KV, 100M ROLL

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Eva Eva is offline
external usenet poster
 
Posts: 197
Default Concatenate Cells

Can you elaborate more about it? You mean cells or rows?
--
Greatly appreciated
Eva


"peterh" wrote:

I am having trouble with a formula to concatenate the descriptions into 1
cell for each S/C #, some have 2, 3 of 4 cells.

Material No. Full Description
904120016 VALVE,SOLENOID, 240V 50HZ, HERION, P/N
9301800-0201, FOR GAS SAFETY SHUT OFF AND VENT
BALL VALVES, ON ALUMINA KILNS
907010005 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER,
BLACK, PVC / V75, .6 / 1KV, 100M ROLL
907010006 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER, RED,
PVC / V75, .6 / 1KV, 100M ROLL

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Concatenate Cells

Maybe this is what you want?

Function mergem(r As Range) As String
mergem = r.Cells(1, 1).Value
k = 1
For Each rr In r
If k < 1 Then
mergem = mergem & "," & rr.Value
End If
k = 2
Next
End Function

With your data in cells A1:E1, =mergem(A1:E1)

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Eva" wrote:

Can you elaborate more about it? You mean cells or rows?
--
Greatly appreciated
Eva


"peterh" wrote:

I am having trouble with a formula to concatenate the descriptions into 1
cell for each S/C #, some have 2, 3 of 4 cells.

Material No. Full Description
904120016 VALVE,SOLENOID, 240V 50HZ, HERION, P/N
9301800-0201, FOR GAS SAFETY SHUT OFF AND VENT
BALL VALVES, ON ALUMINA KILNS
907010005 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER,
BLACK, PVC / V75, .6 / 1KV, 100M ROLL
907010006 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER, RED,
PVC / V75, .6 / 1KV, 100M ROLL

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Concatenate Cells

Ryan

Just a head's up.

In cases where there are any blank cells in the range, your code will add
extra commas.

This revision will ignore blank cells.

Function ConCatRange(CellBlock As Range) As String
Dim Cell As Range
Dim sbuf As String
For Each Cell In CellBlock
If Len(Cell.text) 0 Then sbuf = sbuf & Cell.text & ","
Next
ConCatRange = Left(sbuf, Len(sbuf) - 2)
End Function


Gord Dibben MS Excel MVP

On Tue, 15 Dec 2009 14:59:02 -0800, ryguy7272
wrote:

Maybe this is what you want?

Function mergem(r As Range) As String
mergem = r.Cells(1, 1).Value
k = 1
For Each rr In r
If k < 1 Then
mergem = mergem & "," & rr.Value
End If
k = 2
Next
End Function

With your data in cells A1:E1, =mergem(A1:E1)


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 20
Default Concatenate Cells

Eva,

S/C #'s in Column "C"
Descriptions in Column "E"
Need result in Column "L"

"Eva" wrote:

Can you elaborate more about it? You mean cells or rows?
--
Greatly appreciated
Eva


"peterh" wrote:

I am having trouble with a formula to concatenate the descriptions into 1
cell for each S/C #, some have 2, 3 of 4 cells.

Material No. Full Description
904120016 VALVE,SOLENOID, 240V 50HZ, HERION, P/N
9301800-0201, FOR GAS SAFETY SHUT OFF AND VENT
BALL VALVES, ON ALUMINA KILNS
907010005 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER,
BLACK, PVC / V75, .6 / 1KV, 100M ROLL
907010006 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER, RED,
PVC / V75, .6 / 1KV, 100M ROLL



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Concatenate Cells

Gord-

Sir, that's why you are an MVP!!



--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"peterh" wrote:

Eva,

S/C #'s in Column "C"
Descriptions in Column "E"
Need result in Column "L"

"Eva" wrote:

Can you elaborate more about it? You mean cells or rows?
--
Greatly appreciated
Eva


"peterh" wrote:

I am having trouble with a formula to concatenate the descriptions into 1
cell for each S/C #, some have 2, 3 of 4 cells.

Material No. Full Description
904120016 VALVE,SOLENOID, 240V 50HZ, HERION, P/N
9301800-0201, FOR GAS SAFETY SHUT OFF AND VENT
BALL VALVES, ON ALUMINA KILNS
907010005 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER,
BLACK, PVC / V75, .6 / 1KV, 100M ROLL
907010006 CABLE,BUILDING, 7/0.67, SINGLE CORE, COPPER, RED,
PVC / V75, .6 / 1KV, 100M ROLL

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
Concatenate many cells art Excel Worksheet Functions 8 May 23rd 09 08:36 PM
Concatenate cells Snakeoids Excel Discussion (Misc queries) 6 July 28th 06 01:46 PM
CONCATENATE TWO DIFFERENT CELLS cs_vision Excel Worksheet Functions 10 April 27th 06 11:12 PM
Add Space between concatenate cells Mac Landers Excel Worksheet Functions 3 February 1st 05 08:27 PM
how do I UN-concatenate cells julia Excel Discussion (Misc queries) 2 January 5th 05 07:45 PM


All times are GMT +1. The time now is 03:17 PM.

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

About Us

"It's about Microsoft Excel"