Avoid duplicate entries in a table
We use a table to enter all of our A/P invoices. Is there a way to avoid entering an invoice twice by searching the cells above for the duplicate number for that vendor? The vendor's name is entered in one column, the invoice # is entered in a different
Thanks for any help!
Anwsers to the Problem Avoid duplicate entries in a table
You will need a macro to prevent any duplicates from being entered into your invoice table.
Assuming that invoice numbers are unique, i.e.
different vendors do not use the same numbers, try this macro:
Right click on the worksheet tab and select "View Code".
Enter the below macro in the top right window.
Private Sub Worksheet_Change(ByVal Target As Range)
Set firstinvoice = Range("C2")
If Not Intersect(Target, firstinvoice.EntireColumn) Is Nothing Then
If Target.row > firstinvoice.row Then
If WorksheetFunction.CountIf(firstinvoice.Resize(Target.row - firstinvoice.row), Target.Value) > 0 Then
MsgBox "Invoice number " & Target.Value & " is already entered", vbOKOnly + vbCritical, "Invalid entry"
Target.Value = ""
Change the "C2" to the cell where your first invoice number is.
Hope this helps / Lars-Åke
How to Avoid Downloading Malware
Where are you getting the download?
There are malicious people who download valid copies of a popular download, modify the file with malicious software, and then upload the file with the same name. Make sure you are downloading from the developer's web page or a reputable company.
Cancel or deny any automatic download
Some sites may automatically try start a download or give the appearance that something needs to be installed or updated before the site or video can be seen. Never accept or install anything from any site unless you know what is downloading.
Avoid advertisements on download pages
To help make money and pay for the bandwidth costs of supplying free the software, the final download page may have ads. Watch out for anything that looks like advertisements on the download page. Many advertisers try to trick viewers into clicking an ad with phrases like "Download Now", "Start Download", or "Continue" and that ad may open a separate download.
Recommended Method to Fix the Problem: Avoid duplicate entries in a table:
How to Fix Avoid duplicate entries in a table with SmartPCFixer?
1. You can Download SmartPCFixer here. Install it on your system. When you open it, it will perform a scan.
2. After the scan is finished, you can see the errors and problems which need to be repaired.
3. The Fixing part is finished, the speed of your computer will be much higher than before and the errors have been removed.
Related: AMD Radeon HD 7800M Win8 not working [Anwsered],I can access the internet, get on facebook and get to hotmail, but I can't play games on facebook and I can't open or respond to my e-mails,I keep getting this Media Player error when I log on my computer. [Anwsered],[Anwsered] System Hanging on shutdown and restart,Unable to get the Vlookup property of the WorksheetFunction class,Solution to Error: Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,I'm always being signed off so annoying Tech Support
,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.
,Solution to Problem: Referencing data in another file
,Troubleshoot:Error: "0x81000032 make sure the C: drive is online and set to NTFS" when trying to backup to external hard drive. Error,External Hard Drive not listed in Windows 7 backup wizard Tech Support,Tech Support: I'm always being signed off so annoying,Solution to Problem: Impossible to use Internet Explorer! I keep getting the same error message every time i try to use IE.,Referencing data in Access using Excel [Anwsered],Need Best Way To Present Data [Anwsered],Same question but for windows 7 home edition,sometimes fullscreen won't activate [Solved],Solution to Error: We bought a new computer with windows 7 and it is constantly freezing. How do we fix this?,Solution to Error: Windows 8 update crash (2013-07-22)
Read More: Tech Support: back up files converted to PBD,[Anwsered] Are there any plans to include Firewire support with XP Mode and Windows 7?,Fast Solution to Error: Azure Tools 1.2 for Visual Studio stability hotfix from connect.microsoft.com,Automate drawing a circle around cell [Anwsered],Troubleshoot:AutoComplete entries not displayed for Username field although values are present in registry.,application not found error,any problems in a team where one has Windows XP and the other has Windows 7?,Application/Object-Defined Error,An Excel formula question where hours are totalled and cumulating,Anyone know the hardware email?