+ Reply to Thread
Results 1 to 2 of 2

Find troubles

  1. #1
    David
    Guest

    Find troubles

    I want to select a student name from AE3 Data Validation dropdown and class
    from AF3 Data Validation dropdown and wind up activating the class under
    the student name.

    This finds the student name, but stops there:
    Sub FindClass()
    Dim ThisClass, FoundClass As Range
    Columns("A:A").Find(Range("AE3")).Activate
    ThisClass = Range("AF3").Value
    Set FoundClass = Selection.Find(What:=ThisClass, _
    After:=ActiveCell, LookIn:=xlValues, _
    LookAt:=xlPart, SearchOrder:=xlByRows, _
    SearchDirection:=xlNext, MatchCase:=False)
    End Sub

    --
    David

  2. #2
    David
    Guest

    Re: Find troubles

    David wrote

    > I want to select a student name from AE3 Data Validation dropdown and
    > class from AF3 Data Validation dropdown and wind up activating the
    > class under the student name.
    >
    > This finds the student name, but stops there:
    > Sub FindClass()
    > Dim ThisClass, FoundClass As Range
    > Columns("A:A").Find(Range("AE3")).Activate
    > ThisClass = Range("AF3").Value
    > Set FoundClass = Selection.Find(What:=ThisClass, _
    > After:=ActiveCell, LookIn:=xlValues, _
    > LookAt:=xlPart, SearchOrder:=xlByRows, _
    > SearchDirection:=xlNext, MatchCase:=False)
    > End Sub
    >


    Fumbled around and came up with this:
    Sub FindClass()
    Dim ThisClass As String, Rng As Range
    Columns("A:A").Find(Range("AE3")).Activate
    ThisClass = Range("AF3").Value
    Set Rng = Range(ActiveCell.Address, Range(ActiveCell.Address).End(xlDown))
    Rng.Find(ThisClass).Select
    End Sub

    Works, anyway.

    --
    David

+ 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