+ Reply to Thread
Results 1 to 3 of 3

find row

  1. #1

    find row

    Im using:

    Range(Cells(Range("b:b").find("e0").Row, 1), _
    Cells(Range("b:b").find("e1").Row - 1, 1)).Columns("A:z").Select
    to select all the rows containing 'EO' then sorting the data with

    Selection.Sort Key1:=Range("K3"), Order1:=xlAscending, Header:=xlGuess,
    _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal

    This all works great if the data is at the beginning of the worksheet,
    the problem I have is that I also use the above to select any row with
    'e2' in, not a problem selecting just sorting, because the range for
    sort can vary from k20 to k30, is the a simple way that when ive
    selected the data I can tell what Range the first row starts at. eg if
    I could tell it started at A25 I could the trim and put K25 into sort
    range. The data to sort is always in the k column, and never mixed up.

    Regards Robert


  2. #2
    Tom Ogilvy
    Guest

    Re: find row

    selection(1).Row

    --
    Regards,
    Tom Ogilvy


    <[email protected]> wrote in message
    news:[email protected]...
    > Im using:
    >
    > Range(Cells(Range("b:b").find("e0").Row, 1), _
    > Cells(Range("b:b").find("e1").Row - 1, 1)).Columns("A:z").Select
    > to select all the rows containing 'EO' then sorting the data with
    >
    > Selection.Sort Key1:=Range("K3"), Order1:=xlAscending, Header:=xlGuess,
    > _
    > OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    > DataOption1:=xlSortNormal
    >
    > This all works great if the data is at the beginning of the worksheet,
    > the problem I have is that I also use the above to select any row with
    > 'e2' in, not a problem selecting just sorting, because the range for
    > sort can vary from k20 to k30, is the a simple way that when ive
    > selected the data I can tell what Range the first row starts at. eg if
    > I could tell it started at A25 I could the trim and put K25 into sort
    > range. The data to sort is always in the k column, and never mixed up.
    >
    > Regards Robert
    >




  3. #3

    Re: find row

    thanks tom, easy when you know how
    Regards Robert


+ 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