This is a blog which will post useful infomation about fixing computer errors. To help people troubleshoot errors, speed up computers and share good apps.

9/26/2016

[Anwsered] Delete Duplicate Macro

Delete Duplicate Macro

Hi,

My team has a weekly download that is completed.
 This download contains new accounts and previous accounts.
 Prior to know we didn't have a way to cross-reference the prior sheets and the team members have been reviewing accounts multiple times.
 What
I've designed in a master list where they will insert the data from the download and review from there.
 However, I'm having trouble with the duplicates.

I'm currently using the following to identify how many times the account shows up on the spreadsheet:
=IF(M49="",COUNTIF($C:$C,C49),"")
And I was using the following to identify the accounts that need to be worked:
=IF(N49=2,IF(SUMPRODUCT(--(M:M="Reviewed")),"Yes",""),"")
However, that second formula is not populating correctly because its not reviewing the other entries; only the that specific entry.

What I'm looking for is a macro that can do this instead of the formulas.
 This is what I need the macro to do:
A: Before saving, search for any duplicate accounts
B: Verify if either or any of the duplicates have the word "Reviewed" in column M
C: Delete the duplicates that do not have the word "Reviewed" in column M

Can this be accomplished?

Keys to the Problem Delete Duplicate Macro

Download SmartPCFixer to Fix It (Free)

Sure.
Open up the VBE, and in the ThisWorkbook module, put this code (note that you need to set the correct sheet name and change column callouts, if needed)
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim MyRange As Range
Dim i As Integer
Application.ScreenUpdating = False
'Change this as needed
Sheets("Sheet1").Select
'Look at all continuous cells in column C
Set MyRange = Range("C2", Range("C2").End(xlDown))
For i = MyRange.Count + 1 To 2 Step -1
    If WorksheetFunction.CountIf(Range("C2", Cells(i, "C")), Cells(i, "C").Value) > 1 Then
        If Cells(i, "M").Value <> "Reviewed" Then
            Cells(i, 1).EntireRow.Delete
        End If
    End If
Next
End Sub

Run CHKDSK

  • Go to the Start button.
  • In the Search box, type "cmd" (without quotes) and press Enter.
  • At the command prompt, type "chkdsk /r /f" (without quotes) and press Enter.
  • Reboot your computer.
An error might pop up:

"Access denied as you do not have significant privileges. You have to invoke this utility in elevated mode."

If you receive the above error message, it means you are not logged into you computer as an Administrator. If that's the case, follow these steps to run the command prompt in elevated mode:

  • Go to theStart button.
  • Go to "All Programs > Accessories" and right click on "Command Prompt".
  • Select "Run as Administrator".
  • In the Search box, type "cmd" (without quotes) and press Enter.
  • At the command prompt, type "chkdsk /r /f" (without quotes) and press Enter.
  • Reboot your computer.

Another Safe way to Fix the Problem: Delete Duplicate Macro:

How to Fix Delete Duplicate Macro with SmartPCFixer?

1. Download Error Fixer. Install it on your computer.

2. After the scan is done, you can see the errors and problems which need to be repaired.

3. The Repair part is done, the speed of your computer will be much higher than before and the errors have been fixed. You can also use other functions in this software. Like dll downloading, junk file cleaning and print spooler error repair.


Related: How to Update & Download NVidia GeForce 6100/nForce 420 WHQL Certified driver v.178.13,How to Update & Download NVidia GeForce 7600 GS Video Driver v.295.75 Certified,How Can I Update & Download NVidia GeForce 820M Driver v.344.48 WHQL,[Solved] Download NVidia GeForce GTX 560M VGA Driver v.296.17 Certified,Way to Update & Herunterladen NVidia GeForce GT 130M Video Treiber v.295.75 Certified,How to Update & Download SONY SVE14A1X1RH Realtek Ethernet Driver,Where to Download SONY SVS13A2W9ES Bluetooth Driver (Intel) v.2.6 - 2.6.23.40059,Best Way to Update & Download SONY VGN-CR203E Conexant HDAUDIO SoftV92 Data Fax Modem with SmartCP Setup Program v.7.62.0.50 driver,Best Way to Download SONY VGN-FE790G/N Wireless LAN Driver v.10.6.0.29,Method to Update & Download SONY VGN-NR31Z/S Firmware Extension Parser Device v.8.0.2.3,How to Fix Error 0x0000c1f5 Solución?,Error 0x80071a91 Win7 Fix Patch,Error 0x800ccc60 Windows Live Mail [Solved],Error Message 0x800ccc79 Outlook 2000 Fix,What is Error 0xc1ab0001?,[Answered] x64 saplugin dll,How to Fix Problem - Kb943729 Download?,Troubleshooting: Bccode D1 Error,Java Runtime Tech Support,Troubleshooting: ERROR NO SUCH GROUP Error
Read More: Date format\/ extraction [Anwsered],How to Fix - Delete a blank row?,Solution to Problem: dell factory restore,Troubleshooter of Error: Deleting one of two operating systems on same PC,Fast Solution to Error: deprecation components not compatible
Share:

0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Sample Text

Copyright © Fix Your PC Errors & Speed Up Your PC | Powered by Blogger Design by ronangelo | Blogger Theme by NewBloggerThemes.com