PDA

View Full Version : Solved: Consolodating totals for duplicate rows



Orange_Wed
07-21-2008, 03:28 PM
Hello All,

I'm running Excel 2003 (v. 11.5612) on an XP SP2 system.

What I'm looking to do is to run down a column of entries (we'll call it E) and picks out duplicate entries, totals the values in coulmn F for each duplicate set.

For the output, I would like to have the same macro dump the duplicated entry into column H and the total for all of the duplicates of that type into the I column.

E F G H I
code total Dupe Total
M1 2 M2 3
M2 1
M2 2
L64 1

I've tried using conditional formatting, but the problem arises if there is more than three separate duplications, as in M2 & M3 & M4 get are duplicated. I don't know if this can be done with logic statements or whether it has to be done with VBA.

I haven't had the pleasure of meeting VB, and the last time I coded anything was some Delphi back in 2000. Before that, it was TurboPascal.

Oh, Var, how I miss thee...

I'm willing to learn VBA the quick and dirty way if I have to, as the Boss decided that the "Systems Trainer" job title includes "Computer-Guy-Who-Can-Build-Complex-Data-Entry-Systems-On-A-Moment's-Notice-With-No-Support-And-Less-Information" as one of it's duties.

Thanks in advance for any advice and/or guidance you can offer. Figured it was best to ask the experts before running myself into the ground for many (more/unpaid) hours, only to find that I'm doing it wrong.

Pathetically Greatful for Anything and Everything at this point,

Orange

ilyaskazi
07-21-2008, 10:19 PM
Could you please post an example in excel workbook over here...

Orange_Wed
07-22-2008, 09:09 AM
Thanks for the quick response!

Attached a slightly doctored file.

What I'm aiming at is to have the formula or script dump the totals of the duplicated Cost Codes and the codes themselves into the table to the right of the main page.

Any advice/help you're able to offer will be most appreciated!

Thanks again,

Wednesday

mdmackillop
07-22-2008, 09:17 AM
No attachment.

Orange_Wed
07-22-2008, 10:33 AM
Didin't attach properly the first or second times, apparently.

Third time's the charm...

Thanks Again,

Wednesday

Orange_Wed
07-25-2008, 09:09 AM
Got it, in a round about manner.

Glad I remembered the basics of programming in just about any language.

Just used a series of if...elseif statements and a loop.