Results 1 to 3 of 3

To DILIPandey about False Positive Results of a VBA Code.

Threaded View

  1. #1
    Registered User
    Join Date
    02-19-2013
    Location
    Houston, USA
    MS-Off Ver
    Excel 2010
    Posts
    21

    To DILIPandey about False Positive Results of a VBA Code.

    Hi DILIPandey,

    Sorry to bother again. The following is a code that you developed to help me replacing the repeated data with "same as above". Most of the time, it works very well. However, sometimes it creates "False Positive" results, replacing values that were not equal. Could you please help me explain why that happens. Thanks in advance.

    Best regards,

    Matt

    PHP Code: 
    Sub DILIPandey()
    'checking duplicates
    i = Range("l" & Rows.Count).End(xlUp).Row
    k = 0
    Range("l" & i, "P" & i).Select
    For n = 1 To i - 1
        For Each cell In Selection
            If cell = cell.Offset(-1, 0) Then
                k = k + 1
            End If
            If k = 5 Then
                Selection.Value = "same as above"
            k = 0
            End If
        Next
    Selection.Offset(-1, 0).Select
    Next
    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. VLookup that Results with False or Blank Results
    By mycon73 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-12-2013, 07:16 PM
  2. Replies: 14
    Last Post: 06-27-2012, 04:26 PM
  3. IF function returns false positive
    By AJMaine in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2009, 03:09 PM
  4. [SOLVED] Positive Results
    By lmthomas in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  5. [SOLVED] Positive Results
    By [email protected] in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 06:05 AM

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