Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Remove duplicate rows and sum cells

I am in desperate need of a fairly complex macro that can
do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column A. After
this has been done do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in column A.

This is pretty hard to explain so I made a few screen
shots of each step that I can email. I would appreciate
any input/advice/suggestions I could get on this. It's a
very important step in the project I am working on.
Thanks in advance for any help you could lend me,

Todd
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove duplicate rows and sum cells

Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro that can
do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column A. After
this has been done do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in column A.

This is pretty hard to explain so I made a few screen
shots of each step that I can email. I would appreciate
any input/advice/suggestions I could get on this. It's a
very important step in the project I am working on.
Thanks in advance for any help you could lend me,

Todd



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Remove duplicate rows and sum cells

Tom,

Yes they are. I'm sorry, forgot to add that.

-----Original Message-----
Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro that

can
do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column A.

After
this has been done do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in column

A.

This is pretty hard to explain so I made a few screen
shots of each step that I can email. I would appreciate
any input/advice/suggestions I could get on this. It's a
very important step in the project I am working on.
Thanks in advance for any help you could lend me,

Todd



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove duplicate rows and sum cells

If I read it correctly you want

#1 B-D Unique Entry#1 EA FA GA HA
#2 EB FB GB HB
#3 EC FC GC HC
#1 B-D Unique Entry#2 EA FA GA HA
#2 EB FB GB HB
#3 EC FC GC HC


but the sum in #1 would consist of the sum of 3 rows and the individual sum for the first row would be lost. Wouldn't you want to insert a row and get the sum like this:
Sum
#AA B-D Unique Entry#1
#1 EA FA GA HA
#2 EB FB GB HB
#3 EC FC GC HC
#AB B-D Unique Entry#2
#1 EA FA GA HA
#2 EB FB GB HB
#3 EC FC GC HC
Where #AA would be the grand total for the unique combination of values in B-D (#1) and #AB would be the grand total for the uique combination of values in B-D (#2)

but if you really only want

#AA B-D Unique Entry #1
#AB B-D Unique Entry #2

Then why do the intermediate step of getting unique rows B-H?

--
Regards,
Tom Ogilvy


"ToddG" wrote in message ...
Tom,

Yes they are. I'm sorry, forgot to add that.

-----Original Message-----
Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro that

can
do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column A.

After
this has been done do the following:

For each populated row (except row 1) in a worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in column

A.

This is pretty hard to explain so I made a few screen
shots of each step that I can email. I would appreciate
any input/advice/suggestions I could get on this. It's a
very important step in the project I am working on.
Thanks in advance for any help you could lend me,

Todd



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Remove duplicate rows and sum cells

Tom,

I have a few screenshots of what the end result should
look like if you would like to take a look. It should
clear things up. The reason for the intermediate step of
the unique rows of B-H was to possibly simplify things. My
thought process was that it may be easier to approch this
with a "two step" macro.

Thanks a lot,

Todd
-----Original Message-----
If I read it correctly you want

#1 B-D Unique Entry#1 EA FA

GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
#1 B-D Unique Entry#2 EA FA

GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC


but the sum in #1 would consist of the sum of 3 rows

and the individual sum for the first row would be lost.
Wouldn't you want to insert a row and get the sum like
this:
Sum
#AA B-D Unique

Entry#1
#1 EA

FA GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
#AB B-D Unique

Entry#2
#1 EA

FA GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
Where #AA would be the grand total for the unique

combination of values in B-D (#1) and #AB would be the
grand total for the uique combination of values in B-D
(#2)

but if you really only want

#AA B-D Unique Entry #1
#AB B-D Unique Entry #2

Then why do the intermediate step of getting unique

rows B-H?

--
Regards,
Tom Ogilvy


"ToddG" wrote in

message ...
Tom,

Yes they are. I'm sorry, forgot to add that.

-----Original Message-----
Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro

that
can
do the following:

For each populated row (except row 1) in a

worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column A.

After
this has been done do the following:

For each populated row (except row 1) in a

worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in

column
A.

This is pretty hard to explain so I made a few screen
shots of each step that I can email. I would

appreciate
any input/advice/suggestions I could get on this.

It's a
very important step in the project I am working on.
Thanks in advance for any help you could lend me,

Todd


.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove duplicate rows and sum cells

Have you looked at doing this with a pivot table?

If you have something to look at, then post the URL and I will take a look.

--
Regards,
Tom Ogilvy


"ToddG" wrote in message
...
Tom,

I have a few screenshots of what the end result should
look like if you would like to take a look. It should
clear things up. The reason for the intermediate step of
the unique rows of B-H was to possibly simplify things. My
thought process was that it may be easier to approch this
with a "two step" macro.

Thanks a lot,

Todd
-----Original Message-----
If I read it correctly you want

#1 B-D Unique Entry#1 EA FA

GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
#1 B-D Unique Entry#2 EA FA

GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC


but the sum in #1 would consist of the sum of 3 rows

and the individual sum for the first row would be lost.
Wouldn't you want to insert a row and get the sum like
this:
Sum
#AA B-D Unique

Entry#1
#1 EA

FA GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
#AB B-D Unique

Entry#2
#1 EA

FA GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
Where #AA would be the grand total for the unique

combination of values in B-D (#1) and #AB would be the
grand total for the uique combination of values in B-D
(#2)

but if you really only want

#AA B-D Unique Entry #1
#AB B-D Unique Entry #2

Then why do the intermediate step of getting unique

rows B-H?

--
Regards,
Tom Ogilvy


"ToddG" wrote in

message ...
Tom,

Yes they are. I'm sorry, forgot to add that.

-----Original Message-----
Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro

that
can
do the following:

For each populated row (except row 1) in a

worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column A.
After
this has been done do the following:

For each populated row (except row 1) in a

worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in

column
A.

This is pretty hard to explain so I made a few screen
shots of each step that I can email. I would

appreciate
any input/advice/suggestions I could get on this.

It's a
very important step in the project I am working on.
Thanks in advance for any help you could lend me,

Todd


.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Remove duplicate rows and sum cells

I'll take a look at using a pivot table tonight. To be
honest i've never used them so i'll do some reading
tonight at home. One question does come to mind, will it
be possible to link the pivot table results to cells in
another worksheet? This information needs to be included
in a report that includes cells to other information. Just
a forethought.

Unfortunately I don't have a URL for the screenshots, but
could email them directly to you. If you're interested in
taking a look let me know and i'll get them to you.

Thank you very much for your time invested thus far,

Todd
-----Original Message-----
Have you looked at doing this with a pivot table?

If you have something to look at, then post the URL and I

will take a look.

--
Regards,
Tom Ogilvy


"ToddG" wrote in

message
...
Tom,

I have a few screenshots of what the end result should
look like if you would like to take a look. It should
clear things up. The reason for the intermediate step of
the unique rows of B-H was to possibly simplify things.

My
thought process was that it may be easier to approch

this
with a "two step" macro.

Thanks a lot,

Todd
-----Original Message-----
If I read it correctly you want

#1 B-D Unique Entry#1 EA FA

GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
#1 B-D Unique Entry#2 EA FA

GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC


but the sum in #1 would consist of the sum of 3 rows

and the individual sum for the first row would be lost.
Wouldn't you want to insert a row and get the sum like
this:
Sum
#AA B-D Unique

Entry#1
#1 EA

FA GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
#AB B-D Unique

Entry#2
#1 EA

FA GA HA
#2 EB

FB GB HB
#3 EC

FC GC HC
Where #AA would be the grand total for the unique

combination of values in B-D (#1) and #AB would be the
grand total for the uique combination of values in B-D
(#2)

but if you really only want

#AA B-D Unique Entry #1
#AB B-D Unique Entry #2

Then why do the intermediate step of getting

unique
rows B-H?

--
Regards,
Tom Ogilvy


"ToddG" wrote in

message ...
Tom,

Yes they are. I'm sorry, forgot to add that.

-----Original Message-----
Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro

that
can
do the following:

For each populated row (except row 1) in a

worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column

A.
After
this has been done do the following:

For each populated row (except row 1) in a

worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in

column
A.

This is pretty hard to explain so I made a few

screen
shots of each step that I can email. I would

appreciate
any input/advice/suggestions I could get on this.

It's a
very important step in the project I am working

on.
Thanks in advance for any help you could lend me,

Todd


.



.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Remove duplicate rows and sum cells

I am not interested in receiving some multi megabyte files, If they are
less than 100K each, you can send them to

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I'll take a look at using a pivot table tonight. To be
honest i've never used them so i'll do some reading
tonight at home. One question does come to mind, will it
be possible to link the pivot table results to cells in
another worksheet? This information needs to be included
in a report that includes cells to other information. Just
a forethought.

Unfortunately I don't have a URL for the screenshots, but
could email them directly to you. If you're interested in
taking a look let me know and i'll get them to you.

Thank you very much for your time invested thus far,

Todd
-----Original Message-----
Have you looked at doing this with a pivot table?

If you have something to look at, then post the URL and I

will take a look.

--
Regards,
Tom Ogilvy


"ToddG" wrote in

message
...
Tom,

I have a few screenshots of what the end result should
look like if you would like to take a look. It should
clear things up. The reason for the intermediate step of
the unique rows of B-H was to possibly simplify things.

My
thought process was that it may be easier to approch

this
with a "two step" macro.

Thanks a lot,

Todd
-----Original Message-----
If I read it correctly you want

#1 B-D Unique Entry#1 EA FA
GA HA
#2 EB
FB GB HB
#3 EC
FC GC HC
#1 B-D Unique Entry#2 EA FA
GA HA
#2 EB
FB GB HB
#3 EC
FC GC HC


but the sum in #1 would consist of the sum of 3 rows
and the individual sum for the first row would be lost.
Wouldn't you want to insert a row and get the sum like
this:
Sum
#AA B-D Unique
Entry#1
#1 EA
FA GA HA
#2 EB
FB GB HB
#3 EC
FC GC HC
#AB B-D Unique
Entry#2
#1 EA
FA GA HA
#2 EB
FB GB HB
#3 EC
FC GC HC
Where #AA would be the grand total for the unique
combination of values in B-D (#1) and #AB would be the
grand total for the uique combination of values in B-D
(#2)

but if you really only want

#AA B-D Unique Entry #1
#AB B-D Unique Entry #2

Then why do the intermediate step of getting

unique
rows B-H?

--
Regards,
Tom Ogilvy


"ToddG" wrote in
message ...
Tom,

Yes they are. I'm sorry, forgot to add that.

-----Original Message-----
Is the data sorted by B through H
so that duplicate rows will be adjacent?

--
Regards,
Tom Ogilvy

"ToddG" wrote in message
...
I am in desperate need of a fairly complex macro
that
can
do the following:

For each populated row (except row 1) in a
worksheet, if
all cells in columns B-H are the same, delete the
duplicate rows and sum the cell values in column

A.
After
this has been done do the following:

For each populated row (except row 1) in a
worksheet, if
all cells in columns B-D are the same, delete the
duplicate cell values and sum the cell values in
column
A.

This is pretty hard to explain so I made a few

screen
shots of each step that I can email. I would
appreciate
any input/advice/suggestions I could get on this.
It's a
very important step in the project I am working

on.
Thanks in advance for any help you could lend me,

Todd


.



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
remove duplicate rows but keeping all columns DC Excel Worksheet Functions 3 June 10th 09 03:10 AM
Compare Two Simple Workbooks & Remove Duplicate Rows Dave Excel Discussion (Misc queries) 9 July 25th 07 02:36 PM
How do I remove Duplicate rows? 85225 Excel Discussion (Misc queries) 15 March 9th 07 11:41 PM
Remove duplicate rows based on 1 specific criterion Sweepea Excel Discussion (Misc queries) 5 August 30th 06 04:28 PM
Need macro to remove duplicate rows in a wksht with same order# G2 in AUS Excel Discussion (Misc queries) 2 December 16th 05 05:44 PM


All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"