Hi,

Try this out.
Sub Macro1()
  'Assumes data starts in cell A1
    Columns("A:A").Select
    Selection.Insert Shift:=xlToRight
    Range("B1").Select
    Selection.Cut
    ActiveCell.Offset(2, -1).Range("A1").Select
    ActiveSheet.Paste
    Selection.Copy
    ActiveCell.Offset(1, 0).Range("A1").Select
    ActiveSheet.Paste
    Do Until ActiveCell.Value = ""
      ActiveCell.Offset(2, 1).Range("A1").Select
      Selection.Copy
      Selection.Cut
      ActiveCell.Offset(2, -1).Range("A1").Select
      ActiveSheet.Paste
      Selection.Copy
      ActiveCell.Offset(1, 0).Range("A1").Select
      ActiveSheet.Paste
      Application.CutCopyMode = False
    Loop
    'Goes beyond data, but should not hurt
End Sub

Thanks,
David L

On Jul 30, 7:26 am, Ecovindaloo <vindal...@gmail.com> wrote:
> I need to create macro to reformat spreadsheet for importing into
> Access.  As usual the spreadsheet is not formatted properly.
>
> Here is a piece of the spreadsheet:
> 3196
>
> 28320221EBLADENST       39294812
> 275813701MABLELANE      40189085
>
> 3200
>
> 601771294ANGELINEDRIVE  40240796
> 60136321JOHNMBOORDR     39278689
>
> 3207
>
> 271062990CARRIAGEDRRAMSGAT      39345882
> 271065981OLDPLANKRD     39456725
>
> What I need to do is create a macro to add a column and then take the
> ID Number (i.e. 3169) and put it in those rows below.  Then delete the
> row with the ID Number and blank rows.  Is there any easy way to do
> this in a macro?
>
> Thanks in advance for the help.

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
HELP US GROW !!

We reach over 7000 subscribers worldwide and receive many nice notes about the 
learning and support from the group.Let friends and co-workers know they can 
subscribe to group at http://groups.google.com/group/excel-macros/subscribe

Reply via email to