Results 1 to 5 of 5

Thread: Excel VBA cut, paste, delete process.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    May 2017
    Posts
    2
    Location

    Excel VBA cut, paste, delete process.

    Hi there,

    I am relatively new to VBA and i have come across something that i hope is simple however i have got totally stuck on .

    I want to cut and paste the data which appears as in table 1 to appear as in table 2 shown below. This includes deleting the two blank rows which will be created.

    ((28264) CAMARA) Data Data
    ghost
    popstick
    ((92491) App) Data Data
    sole
    heel
    ((96742) New) Data Data

    Table1

    ((28264) CAMARA) ghost popstick Data Data
    ((92491) App) sole heel Data Data
    ((96742) New) Shoe Chair Data Data

    Table 2

    I have managed to do this once with the following macro, however, obviously this wont work its way through all of the data ending when the entire row is blank.

    Sub move_2()
    Range("A2").Select
    Selection.Cut
    Range("B1").Select
    ActiveSheet.Paste
    Rows("2").Select
    Selection.Delete Shift:=x1Up
    Range("A2").Select
    Selection.Cut
    Range("C1").Select
    ActiveSheet.Paste
    Rows("2").Select
    Selection.Delete Shift:=x1Up
    End Sub
    If someone could help it would be most appreciated.

    Thanks,

    Andy.
    Last edited by Paul_Hossler; 05-29-2017 at 07:52 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •