Results 1 to 3 of 3

Search some part of character running improper

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    03-28-2014
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    Excel 2016
    Posts
    696

    Search some part of character running improper

    Hi,

    I am creating the macro for user to search some parts of characters and skip searching the same row if user click NO.
    The formula below working improper after the last row found.


    FoundRow = 0
    
        For Each r In ws.Range("D5:D" & ws.Cells(Rows.Count, "D").End(xlUp).Row)
       
            If r.Row > FoundRow Then
            
                If FoundRow <> 0 Then
                  Set r = ws.Columns(4).Find(Me.TextBoxborrower.Value, Range("d5").Offset(FoundRow - 5), xlValues, xlPart)
                Else
                  Set r = ws.Columns(4).Find(Me.TextBoxborrower.Value, Range("d5"), xlValues, xlPart)
                End If
                   
            Else
                GoTo nextCell
            End If
         
            If Len(r) >= 3 Then
                If MsgBox("Is it the Borrower your are looking for ?" & vbLf & vbLf & _
                          r.Value, vbYesNo + vbQuestion, "Row Number = " & r.Row) = vbYes Then GoTo FillData
            End If
          
    nextCell: If r.Row >= FoundRow Then FoundRow = r.Row
    
        Next r
    Attached Files Attached Files
    1. Thank those who have helped you by clicking the Star * below the post.
    2. Please mark your post [SOLVED] if it has been answered satisfactorily.

    Sincerely,
    Farid

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Search for character, return part of string in another cell
    By richardtenggren in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2015, 04:23 AM
  2. [SOLVED] Extract a part from cell behind a specific character
    By Marco-Kun in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-22-2012, 03:02 PM
  3. [SOLVED] Need to insert character (dash) between part numbers
    By BYizz in forum Excel General
    Replies: 3
    Last Post: 10-04-2012, 02:21 PM
  4. Truncating part of string to the left of a character
    By UrbanEast in forum Excel General
    Replies: 4
    Last Post: 12-12-2010, 02:37 AM
  5. [SOLVED] Look up the part code having end with desired character
    By PRADEEPB270 in forum Excel General
    Replies: 1
    Last Post: 08-21-2010, 02:25 AM
  6. [SOLVED] Long character string - need to remove part of it
    By laralea in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-14-2006, 07:10 PM
  7. Returning left part of cell before a character
    By Alan in forum Excel General
    Replies: 5
    Last Post: 01-23-2005, 04:06 PM

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