LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Concatenate

Is it all of a standard layout, that is customer name, say 5 lines of notes?
If so this should do it

Sub Test()
Dim iLastRow As Long
Dim i As Long
Dim rng As Range
Const nBlock As Long = 5 '<=== change to suit

iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
If iLastRow Mod nBlock < 0 Then
iLastRow = iLastRow + nBlock - iLastRow Mod 5
End If
For i = iLastRow - 4 To 1 Step -nBlock
Cells(i, "B").Value = Cells(i + 1, "A").Value
Cells(i, "C").Value = Cells(i + 2, "A").Value
Cells(i, "D").Value = Cells(i + 3, "A").Value
Cells(i, "E").Value = Cells(i + 4, "A").Value
If rng Is Nothing Then
Set rng = Rows(i + 1).Resize(4)
Else
Set rng = Union(rng, Rows(i + 1).Resize(4))
End If
Next i

If Not rng Is Nothing Then rng.Delete

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Helpless1" wrote in message
...
HELP! I am a very minimal user and have a huge annoying project that I

keep
wondering if there is an easier way to accomplish. I am doing conversion

work
and have about 29000 lines left of customer information. When the info

from
our old system was imported the customer notes were inserted in a new cell
with every line of text. My current method is to filter by customer number
then concatenate every line of customer notes, then copy and paste special

as
values. I then delete the other lines of text and move to the next

customer
number. PLEASE tell me there is any easier way! Restore my sanity!



 
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
Help with concatenate Riversage Excel Worksheet Functions 1 January 30th 07 03:02 AM
concatenate and then take off last # NTaylor Excel Discussion (Misc queries) 6 December 21st 05 06:04 PM
I know how to concatenate ,can one de-concatenate to split date? QUICK BOOKS PROBLEM- New Users to Excel 1 July 26th 05 05:07 PM
CONCATENATE-1 AYPCN Excel Programming 1 March 9th 05 09:41 PM
CONCATENATE-1 AYPCN Excel Programming 0 March 9th 05 09:15 PM


All times are GMT +1. The time now is 09:37 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"