cocatenation

G

Guest

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.
 
I

Ingolf

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 said:
Cells(Rows.Count, 2).End(xlUp).Row
End If
i = 0
Next 'rng

End Sub

Regards
Ingolf
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top