+ Reply to Thread
Results 1 to 4 of 4

Selecting a subset of rows from a table based on value in first field?

  1. #1
    Registered User
    Join Date
    07-02-2012
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Selecting a subset of rows from a table based on value in first field?

    I have a table like this

    AK 0.8676 0.5233 0.0989
    AK 0.8774 0.5199 0.0994
    AK 0.8804 0.5189 0.1004
    AL 0.8831 0.5179 0.1006
    AL 0.8888 0.5160 0.1026
    AL 0.8918 0.5150 0.1049
    AR 0.8988 0.5126 0.1054
    AR 0.9243 0.5042 0.1062
    AR 0.9354 0.5006 0.1067

    How can I select all the rows in the table that have "AL" as the first field? (They will all be grouped together like above).

  2. #2
    Valued Forum Contributor smuzoen's Avatar
    Join Date
    10-28-2011
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003/2007/2010
    Posts
    610

    Re: Selecting a subset of rows from a table based on value in first field?

    When you have questions could you please upload a sample workbook showing how your spreadsheet is set out rather than just text as in your post as it is easier to test code without having to create a worksheet from scratch. The following code will colour every cell yellow where it finds AL - this assumes that Column 1 of the table is in Column A. I have attached a sample workbook for you to try. You say
    How can I select
    - after you select what do you want to do to the cell. The point I am making is that if you want to colour the cell or copy the cell you do not have to select it first. If the code does not help if you could explain what you want to do after you select the cell I could help you further.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by smuzoen; 07-02-2012 at 11:16 PM.
    Hope this helps.
    Anthony
    Pack my box with five dozen liquor jugs
    PS: Remember to mark your questions as Solved once you are satisfied. Please rate the answer(s) by selecting the Star in the lower left next to the Triangle. It is appreciated?

  3. #3
    Forum Contributor
    Join Date
    02-12-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    275

    Re: Selecting a subset of rows from a table based on value in first field?

    Maybe this is your answer.

    Please Login or Register  to view this content.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Selecting a subset of rows from a table based on value in first field?

    Hi kimberlily307
    Perhaps autofilter?
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ 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