+ Reply to Thread
Results 1 to 8 of 8

Deleting Specific Rows

  1. #1
    Registered User
    Join Date
    02-17-2008
    Posts
    10

    Deleting Specific Rows

    Hi,

    I'm trying to delete all row that contain Student information.
    I've tried a macro but i doesn't work.
    I 'm very new to coding so any help would be greatful!

    SAMPLE DATA:

    Teacher Information Count: 1
    Total Upper Lower L&L
    AP Number Dep Perf Perf Status LaLon Source Type
    ----------------------------------------------------------------------------------------
    300 250 3042 A ==================================================================


    Monthly Progress
    Beginning Year: Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec
    ----------------------------------------------------------------------------------------
    Teacher 1,684 1,239 5,638 3,454 2,309 2,085
    Student
    ----------------------------------------------------------------------------------------
    1990
    Teacher 3,298 1,721 1,795 2,456 2,514 2,034 2,038 1,821 2,200 2,386 2,079 1,951
    Student
    ----------------------------------------------------------------------------------------
    1991
    Teacher 1,462 1,732 821 4,223 4,281 4,676 3,821 3,084 3,815 3,745 3,565 2,783
    Student
    ----------------------------------------------------------------------------------------
    1992
    Teacher 3,398 3,181 2,751 472 1,206 1,082 626 1,175 1,351
    Student
    ----------------------------------------------------------------------------------------
    1993
    Teacher 781 394 683 436 1,185 959 831 910 1,706 1,447 1,136 1,306
    Student
    ----------------------------------------------------------------------------------------
    1994
    Teacher 925 883 1,272 1,600 1,063 776 1,397 1,449 1,938 1,711 1,420 1,398
    Student
    ----------------------------------------------------------------------------------------

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    HI

    Bit hard to work out your format from the post, so could you please attach an example file for review.

    rylo

  3. #3
    Registered User
    Join Date
    02-17-2008
    Posts
    10
    Rylo,

    Thanks for the response!
    Here's the sample file.

    Phillim
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    This will delete any row that doesn't have "Teacher" in column A.

    Do you want to retain any of the heading rows?

    Please Login or Register  to view this content.
    rylo

  5. #5
    Registered User
    Join Date
    02-17-2008
    Posts
    10
    It's work great, thanks alot!!

    There's only one problem, the sample i have it's quite right I teacher are orginally in A2 not A1 and
    I wasn't sure how to change the code to reflrct this. I attached another sample file for you to look at.

    Also, is there a code I can add to shift just Teacher to A1?

    Any help would be appreiciated.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    How about

    Please Login or Register  to view this content.
    rylo

  7. #7
    Registered User
    Join Date
    02-17-2008
    Posts
    10
    Rylo,

    Thanks for the updated code, it works great!
    I did forget to mention, that I do need to retain the header information.

    Any help would be appricated.

    Phillim

  8. #8
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Just change the ending row of the loop. So if the headers take up the first 3 rows, then change it to

    Please Login or Register  to view this content.
    rylo

+ 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