Results 1 to 6 of 6

Excel VBA Find and Replace Run Time Error 91

Threaded View

mangesh.mehendale Excel VBA Find and Replace... 06-30-2015, 02:31 AM
NeedForExcel Re: Excel VBA Find and... 06-30-2015, 02:54 AM
mangesh.mehendale Re: Excel VBA Find and... 06-30-2015, 02:57 AM
NeedForExcel Re: Excel VBA Find and... 06-30-2015, 03:04 AM
mangesh.mehendale Re: Excel VBA Find and... 06-30-2015, 03:30 AM
mangesh.mehendale Re: Excel VBA Find and... 06-30-2015, 04:02 AM
  1. #1
    Valued Forum Contributor mangesh.mehendale's Avatar
    Join Date
    06-04-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    510

    Unhappy Excel VBA Find and Replace Run Time Error 91

    Sub Macro3()
    '
    ' Macro3 Macro
    '
    
    '
        Sheets("Tally Data").Select
        Dim Rng As Range
        Dim C As Range
        Dim uSSo As String
        uSSo = "NA"
        Range("T11:T5010").Select
        With Selection
        Set C = .Find(What:=uSSo, After:=Range("T11"), LookIn:=xlFormulas, LookAt _
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
            False, SearchFormat:=False).Active
        If Not C Is Nothing Then
        ActiveCell.Replace What:="NA", Replacement:="", LookAt:=xlPart, _
            SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
            ReplaceFormat:=False
        Else
        Range("T11").Select
        Selection.End(xlDown).Select
        ActiveCell.Offset(0, 1).Select
        Range(Selection, Selection.End(xlUp)).Select
        Selection.FillDown
        Range("U11").Select
        Selection.End(xlDown).Select
        ActiveCell.Offset(0, 1).Select
        Range(Selection, Selection.End(xlUp)).Select
        Selection.FillDown
        End If
        End With
        Range("A1").Select
    End Sub
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel VBA Find and Replace Run Time Error 91
    By mangesh.mehendale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2015, 05:40 AM
  2. Replies: 3
    Last Post: 11-25-2014, 06:08 AM
  3. Run Time Error '6' Overflow - Macro That Find Text and Copy Range & Replace on Other Sheet
    By asgharhussaini in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2013, 04:34 AM
  4. Find and replace #REF! Error
    By nickcast22 in forum Excel General
    Replies: 1
    Last Post: 07-19-2012, 05:56 PM
  5. find in excel replace in word: find/replace text in text boxes and headers
    By dean.rogers in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-10-2012, 12:40 PM

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