+ Reply to Thread
Results 1 to 8 of 8

Macro that Matches Scanned Data

Hybrid View

  1. #1
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,308

    Re: Macro that Matches Scanned Data

    Try this...
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim lRow As Long, rg As Range, c As Range
        Dim b As Boolean, s As String
    
        If Target.Column > 1 Then Exit Sub
        
        b = False
        lRow = Sheet1.Cells(Rows.Count, 3).End(xlUp).Row
        Set rg = Sheet1.Range("C6:C" & lRow)
        With rg
            Set c = .Find(Target.Value, Cells(6, 3))
            If Not c Is Nothing Then
                s = c.Address
                Do
                    If c.Offset(, 3) = vbNullString Then
                        c.Offset(, 3) = Target.Value
                        c.Offset(, 4) = Now()
                        b = True
                    Else
                        Set c = .FindNext(c)
                    End If
                Loop Until c.Address = s
            End If
            If b = False Then
                Sheet1.Cells(lRow + 1, 3) = Target.Value
                Sheet1.Cells(lRow + 1, 4) = Now()
            End If
        End With
    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 05-29-2018, 01:20 PM
  2. Guidance with Barcode Scanned Sales Recon Macro
    By Sintek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2017, 01:49 PM
  3. Vba to enter scanned Data into Column Depending on what is scanned.
    By JRidge in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2014, 08:20 AM
  4. How to automatically sort Scanned data to excell
    By JoeGellar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-07-2013, 02:06 PM
  5. Controlling scanning and naming of a scanned document ipdf from within an Excel macro
    By Tumushabe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-07-2012, 02:15 PM
  6. Auto Enter After Data is Scanned
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2008, 01:52 PM
  7. Importing scanned data
    By Jack Sheet in forum Excel General
    Replies: 7
    Last Post: 07-18-2006, 07:20 AM

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