Re: Excel Macro help

From: Lori Jo Vincent (anonymous_at_discussions.microsoft.com)
Date: 07/30/04


Date: Fri, 30 Jul 2004 11:11:35 -0700

Thank you so much for putting this post out. This helped
me with a problem I was having.

I receive a very ugly TXT report file that isn't
formatted to be of any use. I used these instructions to
re-organize the data to columns to the right of the
existing data, re-sorted and pulled out what I was after.

-- L J

>-----Original Message-----
>Hi Josh,
>
>Some
>
>Sub ReOrganise()
>Dim cRows As Long
>Dim i As Long
>
> cRows = Cells(Rows.Count, "A").End(xlUp).Row
> For i = cRows To 1 Step -1
> With Cells(i, "A")
> .Offset(1, 0).Resize(2).EntireRow.Insert
> .Offset(0, 1).Copy .Offset(1, 1)
> .Offset(0, 2).Copy .Offset(1, 2)
> .Offset(0, 4).Copy .Offset(1, 4)
> .Offset(0, 5).Copy .Offset(1, 5)
> .Offset(0, 4).Value = ""
> End With
> Next i
>End Sub
>
>--
>
>HTH
>
>Bob Phillips
> ... looking out across Poole Harbour to the Purbecks
>(remove nothere from the email address if mailing direct)
>
>"Josh" <joshweb@mac.com> wrote in message
>news:ebe8c4dc.0407290058.5dce4db1@posting.google.com...
>> I've exported data from one accounting software
package into a
>> tab-delimited txt file that I can use in Excel. I'd
like to format
>> the txt file in Excel so that it is in the proper
format to be
>> imported into a different accounting software package.
>>
>> I've gotten things to a point and now I need a macro
that will insert
>> 2 blank line between each row. I've been able to find
a macro that
>> inserts 1 blank line, but I need two rows and I don't
know how to read
>> the code.
>>
>> Now I've got the records formatted with 1 line of data
followed 2
>> blank rows inserted, I need the data in cells B,C, and
F copied to the
>> first blank row and I need the data from column E cut
and pasted into
>> the first blank row. There is an entirely blank row
inbetween each
>> record.
>>
>> A B C D F
>> B C E F
>> (blank row)
>>
>> I need this macro to perform this modification on
every record in the
>> work***, and I don't know how to write a loop within
an Excel
>> macro.
>>
>> Any help out there?
>
>
>.
>