I’ve got duplicate dates in my first column. I have corresponding ratings in the next columns. My goal is to combine the ratings into all one date only if they are duplicate dates. I have many duplicate dates and for each duplicate I simply want to combine the numbers:
DATE 5STAR 4STAR 3STAR 2STAR 1STAR
12/2/2009 0 1 0 0 0
12/2/2009 1 0 0 0 0
4/6/2011 1 0 0 0 0
4/6/2011 1 0 0 0 0
So in the example above I would want to be left with:
DATE 5STAR 4STAR 3STAR 2STAR 1STAR
12/2/2009 1 1 0 0 0
4/6/2011 2 0 0 0 0
Assuming that your original sheet is called “duplicate data” and that you have created a second sheet called “combined data” and which has exactly the same format but with only one row per date, but this formula in B2 of combined data and drag down and over as far as necessary:
In Excel 2007 and 2010 you can easily remove duplicate dates using Remove Duplicates in the Data tab. In XL 2003 I believe you’d use the Advanced Filter in the Filter item of the Data menu.
If you’re going to be doing this more than once, I’d look at normalizing your data a bit so that you could do this with a pivot table. If I’m guessing correctly that only one column per row ever gets a one, i.e., there’s only one rating per row, and your data looked like this…
… you could easily create a pivot table from it.