Mac
I modified the code to format the first 2 columns of the "Finish" sheet
to text. That retains the leading zeros in the ID and makes the account
numbers text. Is that what you wanted? Otto
Sub ReArrangeData()
Dim rColA As Range
Dim i As Range
Dim j As Range
Dim Dest As Range
Dim rRowi As Range
Application.ScreenUpdating = False
Sheets("Start").Select
Set rColA = Range("A2", Range("A" & Rows.Count).End(xlUp))
Set Dest = Sheets("Finish").Range("A2")
Dest.Resize(, 2).NumberFormat = "@"
For Each i In rColA
Set rRowi = Range(Cells(i.Row, 2), Cells(i.Row,
Columns.Count).End(xlToLeft))
For Each j In rRowi
Dest.Value = CStr(i.Value)
Dest.Offset(, 1).Value = Right(Cells(1, j.Column).Value,
4)
Dest.Offset(, 2).Value = j.Value
Set Dest = Dest.Offset(1)
Dest.Resize(, 2).NumberFormat = "@"
Next j
Next i
Application.ScreenUpdating = True
End Sub
> Otto
> I cannot thank you enough . It worked. The only problem I have is that
[quoted text clipped - 84 lines]
>> >> >
>> >> > Any help will be greatly appreciated
mac - 11 May 2008 01:11 GMT
ello Otto,
I don't know how to thank you for helping me. The id is working fine but
the account number are not coming over correctly. Example is acct no 0100.0
is coming over as 00.0 and 3003.1 is coming over as 03.1. Otto, I would
like to thank you again. I have about 20,000 acccount number and i used to
copy and paste in order to get it the way I need it so you have saved me a
ton of time.

Signature
thank you mac
> Mac
> I modified the code to format the first 2 columns of the "Finish" sheet
[quoted text clipped - 113 lines]
> >> >> >
> >> >> > Any help will be greatly appreciated
mac - 11 May 2008 01:50 GMT
Otto
I figured it out I changed the 4 to 6 and it works!!!!! Thank you so
much.!!!!!

Signature
thank you mac
> Mac
> I modified the code to format the first 2 columns of the "Finish" sheet
[quoted text clipped - 113 lines]
> >> >> >
> >> >> > Any help will be greatly appreciated
Otto Moehrbach - 11 May 2008 17:35 GMT
Mac
Remember that the 6 that you put in the code means that VBA will take
the last 6 characters from that cell. If you ALWAYS want those last 6
characters, then it will work right for you, but if not, then tell me what
your actual data conditions are and I'll see how I can massage the code to
account for the variations you have. Otto
> Otto
>
[quoted text clipped - 132 lines]
>> >> >> >
>> >> >> > Any help will be greatly appreciated
mac - 11 May 2008 19:49 GMT
Hello Otto,
All my accounts have the same number of digits xxxx.x so it works great. I
cannot thank you enought for the help you have given me. You have no idea of
the time I spent getting the data the way I wanted. Again thank you!!!!!!

Signature
thank you mac
> Mac
> Remember that the 6 that you put in the code means that VBA will take
[quoted text clipped - 138 lines]
> >> >> >> >
> >> >> >> > Any help will be greatly appreciated