Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default cocatenation

i I need to concatenate several cells to make up one cell as a description
for a item number. e.g.
cell a1 may contain the item number and cells b1 and b2 the part description
that have to be concatenated to cell c1 to make the full description. The
only thing is some items have as many as 8 cells of part descriptions for eg
cell a10 may have have cells b10,b11,b12,b13,b14,b15 as containing parts of
the description that all have to be concatenated. I have a problem, As I have
over 2000 items to do ,can anyone help with functions /macros to help me with
this .
Thanks again everyone.
--
delmac
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default cocatenation

Hi, delmac

I assumed the cells in column A between the item numbers are empty and
there is no empty row between two items, right? So, this should work.

Sub ConcParts()

Dim rng As Range
Dim i As Integer

For Each rng In Range("C1:C" & Cells(Rows.Count, 2).End(xlUp).Row)
If rng.Offset(0, -2) < "" Then
Do
rng = rng & rng.Offset(i, -1)
i = i + 1
Loop Until rng.Offset(i, -2) < "" Or rng.Offset(i, -2).Row _
Cells(Rows.Count, 2).End(xlUp).Row

End If
i = 0
Next 'rng

End Sub

Regards
Ingolf

i I need to concatenate several cells to make up one cell as a description
for a item number. e.g.
cell a1 may contain the item number and cells b1 and b2 the part description
that have to be concatenated to cell c1 to make the full description. The
only thing is some items have as many as 8 cells of part descriptions for eg
cell a10 may have have cells b10,b11,b12,b13,b14,b15 as containing parts of
the description that all have to be concatenated. I have a problem, As I have
over 2000 items to do ,can anyone help with functions /macros to help me with
this .
Thanks again everyone.
--
delmac


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
Cocatenation using VBA CLamar Excel Discussion (Misc queries) 1 June 28th 06 07:01 PM


All times are GMT +1. The time now is 11:30 AM.

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"