I am looking for a macro that will evaluate "Column A"
IF there are duplicates in "Column A" ......... add the "Column C" values and save only one instance. I have an example attached.
Thanks so much!
I am looking for a macro that will evaluate "Column A"
IF there are duplicates in "Column A" ......... add the "Column C" values and save only one instance. I have an example attached.
Thanks so much!
1) In D1 enter this formula: =SUMIF(A:A, A1, C:C)
2) Copy that formula down column D
3) Copy the new values in column D
4) Click on C1 and do a Paste Special > Values to update that column
5) Clear the column D you added
6) Now highlight your full data table and do a Data > Remove Duplicates function using only column A as the filter.
Video: http://screencast.com/t/h1iZcxfUVU
(sorry the sound is so bad)
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
this looks good. but I have another wrinkle if you don't mind.
I have attached another sheet that has a tab "real data"
this is a raw data file and all the other lines must stay in place even the "" I want to only delete the yellow line in this case.
1) Insert a blank row 1
2) Put "Key" in B2
3) In C2 enter this formula, then copy down:
=IF(LEN($A2)>4,IF(COUNTIF($A$2:$A2,$A2)=1,SUMIF($A:$A,$A2,$B:$B),"delete"),"")
4) Copy C2:C12 and Paste Special > Values onto B2.
5) Clear column C
6) Click on column B and turn on the Data > Filter
7) Use the drop down to filter for "delete"
8) Delete the visible rows
9) Now delete row1, this will remove the row you added and turn off the Autofilter at the same time.
Last edited by JBeaucaire; 11-12-2014 at 03:25 PM.
perfect! Thanks for all of the help!!!!!!!!!!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks