+ Reply to Thread
Results 1 to 6 of 6

Delete rows starting with "P0", they occur every 4th line down

  1. #1
    Registered User
    Join Date
    11-26-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    Excel 2010
    Posts
    11

    Delete rows starting with "P0", they occur every 4th line down

    Good Morning,

    Wondering if anyone can help me build a macro? This is for charity and I'm under some time contraints to format a .xls ready for label printing

    Quandary: Delete every row containing "P0". Most lines have 3 non"P0" lines in between but every now and then there are 4.

    Example:

    1 P000001
    2 Kim
    3 Address
    4 City, Prov,PC
    5 P000002
    6 Joe
    7 Address
    8 City, Prov, PC
    9 P000003
    10 Sally
    11 Address
    12 City, Prov, PC
    13 P000004
    14 Mike
    15 Jane
    16 Address
    17 City, Prov, PC
    18 P000005

    A milliong THANKS!!!!!!!!!!

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Delete rows starting with "P0", they occur every 4th line down

    On wich column you have data ? attach a sample file
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    11-26-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Delete rows starting with "P0", they occur every 4th line down

    I can't seem to attach. All cells are in column A, starting A1.

    P000001
    Joe Smith
    123 address
    Edmonton AB T5N 0M3
    P000002
    Joe Smith
    123 address
    Edmonton AB T5N 0M3
    P000003
    Joe Smith
    123 address
    Edmonton AB T5W 2E3
    P000004
    Joe Smith
    123 address
    Edmonton AB T5P 4W3
    P000005
    Joe Smith
    Gene Klenke
    123 address
    Edmonton AB T6H 4L3
    P000006
    Joe Smith
    Sally Smith
    123 address
    Edmonton AB T6H 4L3
    P000007
    Joe Smith
    123 address
    Stony Plain AB T7Z 2X3
    P000011
    Joe Smith
    Sally Smith
    123 address
    Edmonton AB T5M 1P8
    P000012

  4. #4
    Registered User
    Join Date
    11-26-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Delete rows starting with "P0", they occur every 4th line down

    I can't seem to attach. All cells are in column A, starting A1.

    P000001
    Joe Smith
    123 address
    Edmonton AB T5N 0M3
    P000002
    Joe Smith
    123 address
    Edmonton AB T5N 0M3
    P000003
    Joe Smith
    123 address
    Edmonton AB T5W 2E3
    P000004
    Joe Smith
    123 address
    Edmonton AB T5P 4W3
    P000005
    Joe Smith
    Gene Klenke
    123 address
    Edmonton AB T6H 4L3
    P000006
    Joe Smith
    Sally Smith
    123 address
    Edmonton AB T6H 4L3
    P000007
    Joe Smith
    123 address
    Stony Plain AB T7Z 2X3
    P000011
    Joe Smith
    Sally Smith
    123 address
    Edmonton AB T5M 1P8
    P000012

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Delete rows starting with "P0", they occur every 4th line down

    Give this a try. Be sure the active sheet is the sheet you want to remove PO

    Please Login or Register  to view this content.
    Last edited by mike7952; 11-26-2012 at 02:35 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  6. #6
    Registered User
    Join Date
    11-26-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Delete rows starting with "P0", they occur every 4th line down

    THANK YOU so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1