PDA

View Full Version : Help Creating a Macro



Leearning
01-28-2013, 08:57 AM
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

Bob Phillips
01-28-2013, 11:22 AM
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.

Leearning
01-29-2013, 08:12 AM
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!

Leearning
01-29-2013, 09:25 AM
So i sort of fugured out what you were stating. How do you delete visible cells only with out deleting the whole column?

Leearning
01-29-2013, 09:42 AM
So i sort of fugured out what you were stating. How do you delete visible cells only with out deleting the whole column?

hunsnowboard
01-30-2013, 01:05 AM
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.

Bob Phillips
01-30-2013, 02:22 AM
I was suggesting that you delete the whole row after you filter the data. Columns are not relevant in this.