Delete Duplicates and Concatenate Based on Date

nrobbins

New Member
Joined
Oct 7, 2010
Messages
27
Hi Guys,

I'm kind of new to this... can anybody help me? I've tried reading the other sort-concat threads on here, but I was unable to apply them to my own needs.

Basically, I get a bunch of data dumped into excel with a date and a description. There's always a date in Column A, and a description in Column B. Sometimes, there are multiple duplicates in Column B for each day.

I need to produce vba that will:


-delete duplicates based on date (column A)
-concatenate text strings based on date (for each day of the month, or each day that is present in column A)


Any ideas would be much appreciated.

Thanks!
 
Hi Ziad,

Thank you again for all your help. Much appreciated!

This macro is really good, and it works! However, it deletes ALL duplicates (i.e. it is not reliant on the cell value of A1. )


Example: I fill worksheet with A2 - Sept 9 to Sept 20
I fill worksheet with B2 - "electro" entered into all but one, "electron" entered into one

The macro automatically deletes ALL "electro" entries. It does not register the fact that the dates in column A are different.


Thanks,


Nick
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
I believe this can all be done in one large if statement as well...


=if(a2=a3=a4=a5=a6=a7=a8=a9=a10=a11=axxxxx......etc......, concatenate(a1, ", ", a2, ", ", a3, ", "a4, ", ",a5, ", ",a6, ", ",a7, ", ",a8, ", ",a9, ", ",a10, ", ",a11, ", ",axxxxx etc), if(a2=a3=a4=a5=a6=a7=a8=a9=a10=a11, concatenate(a1, ", ", a2, ", ", a3, ", "a4, ", ",a5, ", ",a6, ", ",a7, ", ",a8, ", ",a9, ", ",a10, ", ",a11), if(.........


and this would continue.


Would this work? You could have the macro "autofill" column C, and then just have the macro automatically delete duplicate rows as well.


Thanks.
 
Upvote 0
dear nick

it is the time now to do it on your own.
never forget : " Who ever gives his best,will never regret it.
takecare :):):):)
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,831
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top