+ Reply to Thread
Results 1 to 5 of 5

Selecting All Used Rows Including and Underneath Specific Value

  1. #1
    Registered User
    Join Date
    11-04-2012
    Location
    Perth, AU
    MS-Off Ver
    Excel 2007
    Posts
    13

    Selecting All Used Rows Including and Underneath Specific Value

    Hello World!

    I have been working on an excel worksheet that is generated by one of our project reporting systems. The system exports to excel all of the financial information for the project being reviewed.

    Every generated worksheet has the word Programme somewhere in Column B, however, given each project produces a worksheet with varying rows, Programme can appear anywhere from B6:B999.

    I would like to select all rows beneath and including the word Programme.

    Please Login or Register  to view this content.
    The above code searchs for Programme and then selects the row and then moves the selection one row beneath.

    I need the code to search for Programme, select that row, and then include all rows below in the selection.

    Inspiration?

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Selecting All Used Rows Including and Underneath Specific Value

    Hi
    try this macro
    note it is case sensitive and will find "Programme" but not programme" - let me know if this is a problem

    Please Login or Register  to view this content.

  3. #3
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Selecting All Used Rows Including and Underneath Specific Value

    @ NickyC,

    Nice one.

    I would do it like this:

    Please Login or Register  to view this content.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  4. #4
    Registered User
    Join Date
    11-04-2012
    Location
    Perth, AU
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Selecting All Used Rows Including and Underneath Specific Value

    Thank you Nicky and Winon.

    Unfortunately, I could not get either of your codes to actually cooperate with my sheet. After bashing my head against the keyboard, I have decided to just rig it to work. As the number of rows will vary greatly per sheet, I have defined two variables as my range. The first being the activecell.row where Programme has been found and the second an arbitray number that I believe will encompass the entire range of cells that I am trying to select.

    Please let me know if there is anything you see that can be approved upon.
    Please Login or Register  to view this content.
    Thank you again.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Selecting All Used Rows Including and Underneath Specific Value

    Hello xkittenxx,

    Thank you for the Rep.

    Maybe you can make do with this sample WorkBook, or adjust it to your needs.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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