Consulting

Results 1 to 7 of 7

Thread: Help Creating a Macro

  1. #1

    Help Creating a Macro

    I need some help creating a macro. Or a way to do a process quicker

    I need to

    1. Find Duplicate reciepts (need to check against 3 different variables to make sure they are actual dups in my worksheet)

    2. I need to delete one of the duplicates

    Right now I create a new column use concatenate from 3 different data cells. Paste this all the way down. Then using conditional formatting for duplicates and then going one by one and deleting one of the duplicates.

    It was okay for awhile, but now I have too much data - Any help is greatly appreciated

    Mike

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Create a formula in a helper column along the lines of

    =COUNTIFS($A$1:$A1,$A1,$B$1:$B1,$B1,$C$1:$C1,$C1)

    Copy down.

    Filter that column for values > 1, then delete visible rows.

    Do that with the macro recorder on, you have our code.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3

    Still need help

    I am not sure exactly what you mean - when I place that in the helper column- I use the columns that my data to check for dups is in then I get different numbers 0,1,2,3. I filter to delete all that is greater than one? I need one of the duplicates to stay and how would I go about putting this into a macro? Sorry I am really not knowledgable on excel and would greatly appreciate some more input. If more info is needed to help please let me know.

    Thanks so MUCH!

  4. #4
    So i sort of fugured out what you were stating. How do you delete visible cells only with out deleting the whole column?

  5. #5
    So i sort of fugured out what you were stating. How do you delete visible cells only with out deleting the whole column?

  6. #6
    Sort it. Press F5 (Go to). Press Special... button (bottom left). Then select the "Select only visible" radio button. Press OK.

    There you are...only visible cells selected. Now you can delete them or do whatever you want.

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    I was suggesting that you delete the whole row after you filter the data. Columns are not relevant in this.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •