+ Reply to Thread
Results 1 to 8 of 8

Alert User of Duplicate Entry

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Alert User of Duplicate Entry

    I spoke too soon. Cell A4 on the Tracker sheet is linked to cell A1 on the Store sheet. This causes a problem when a search for cell A4 (tracker) is done on column A of the store sheet. I changed the range from A:A to A2:A2000, but there is still an issue. What am I missing?

    Aside from not wanting to duplicate records, cell A4 from the Tracker sheet is pasted into collumn A on the store sheet and the same is done for A8 on the Tracker to collumn B on the store sheet. Clearly Beau saw what I was trying to accomplish but I am adding this because my guess is that the linking was inefficient. Sorry if I have confused anything. Just ask and I'll clarify. Thanks
    Last edited by dreicer_Jarr; 02-16-2011 at 12:32 AM.
    ______________________________________
    "Vision without Execution is a Hallucination"
    Edison

  2. #2
    Forum Contributor
    Join Date
    04-02-2008
    Location
    Jacksonville Beach, Florida
    MS-Off Ver
    Microsoft Excel 2003 and 2010
    Posts
    264

    Re: Alert User of Duplicate Entry

    Got it. Just needed to delete the two links I had in A1 and B1 on the "Store" tab and change the code to what's below (the only change was making A1, A4 and B1, A8. THANKS AGAIN!

    Option Explicit
    
    Sub NameUpdate()
    Dim wsT As Worksheet:   Set wsT = ThisWorkbook.Sheets("Tracker")
    Dim wsS As Worksheet:   Set wsS = ThisWorkbook.Sheets("Store")
    Dim vFIND As Range
    Dim NR As Long
    Application.ScreenUpdating = False
    
    On Error Resume Next
    Set vFIND = wsS.Range("A:A").Find(wsT.[A4], LookIn:=xlValues, LookAt:=xlWhole)
    If Not vFIND Is Nothing Then
        MsgBox "Already entered"
        Exit Sub
    End If
    
    NR = wsS.Range("A" & wsS.Rows.Count).End(xlUp).Row + 1
    
    With Sheets("Tracker")
        wsS.Range("A" & NR).Value = .Range("A4")
        wsS.Range("B" & NR).Value = .Range("B8")
    
        .Range("A4:A5").Value = .Range("AL1:AL2").Value
        .Range("A8:A9").Value = .Range("AL1:AL2").Value
    
        .Range("H1") = "1"
        .Range("W3") = "1"
    End With
    
    ThisWorkbook.Save
        
    Application.ScreenUpdating = True
    End Sub

+ 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