View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
LaDdIe LaDdIe is offline
external usenet poster
 
Posts: 131
Default combine multiple rows of data into one row.

Job Done!!
Thank you so much, Best wishes 2009.

"Joel" wrote:

This is the quick simple method. There are quicker more efficient methods if
this code run slow.

Sub combine()

RowCount = 1
Do While Range("A" & RowCount) < ""
NextRow = Range("A" & (RowCount + 1))
If Left(NextRow, 1) < "" And _
NextRow < "" Then
Range("A" & RowCount) = _
Range("A" & RowCount) & NextRow
Rows(RowCount + 1).Delete
Else
RowCount = RowCount + 1
End If
Loop
End Sub


"LaDdIe" wrote:

Happy New Year!

Could I have some help to find a solution to my task.

In column A
I have about 3000 rows of data,
The string in the first cell starts with the symbol , which then follow
with strings in preceeding cells which do not start with the symbol , then
again there may be a another string in a cell which does start with the
symbol .

I need a macro that looks from top to bottom in col A for a string that
starts with , then combine that string with other strings below that do not
start with , if the string below starts with then it should stop combining.

Simply put the symbol denotes the start of a sentence.

Any help will save my little fingers goinig numb