+ Reply to Thread
Results 1 to 2 of 2

Having trouble defining .FIND Range

Hybrid View

  1. #1
    Registered User
    Join Date
    09-06-2012
    Location
    Littleton, CO
    MS-Off Ver
    Excel 2010
    Posts
    1

    Having trouble defining .FIND Range

    Greetings,

    I have a sub I have been working on for a while. It works beautifully on the first section of my spreadsheet, but not on any subsequent sections.

    I am working with an antiquated report our accounting system spits out.

    I need to look for the first instance of a value, ("STATE END") in column A, starting at the row I have defined with my input box ("CurrRow") and searching to the bottom of the worksheet.

    The line that is not working for me is "Set uRange = Activesheet.UsedRange"
    Everything else works great.

    Here is what I have:

    ' Run the Input Box.
        Response = Application.InputBox("Enter the Starting Row Number as an Integer.", _
        "Number Entry", , 250, 75, "", , 1)
    
    ' Check to see if ESC was pressed.
        If Response <> False Then
    
    ' If not, write the number to the variable.
        CurrRow = Response
        End If
        
    'Determine End of Range
    Set uRange = ActiveSheet.UsedRange
    
    Set FindTitle = uRange.Find("STATE END")
    
        If FindTitle Is Nothing Then
            MsgBox ("Sorry! No keyword title is found")
        Else
            tRow = FindTitle.Row
            tCol = FindTitle.Column
        End If
    Please help!!!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Having trouble defining .FIND Range

    Have you defined your variable?

    Dim uRange As Range
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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