#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Adding like rows

I use Excel 2003. I have a 100 row spreadsheet with 3 columns:
Amount, Value A & Value B. What is the easiest way to create a second
3 column spreadsheet where each row is unique Value A - Value B
combination and the 3rd column is the total of every amount in the
original spreadsheet with that particular A-B value.

To illustrate with a simple example, if I start with:

$500 10 265
$200 10 265
$100 20 300
$300 20 300

I want this result:

$700 10 265
$400 20 300

Thanks very much,
Dave
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Adding like rows

One simple formulas play which should deliver it for you

To keep things neat, let's just take it out in adjacent cols on the same
sheet
(it'll work as well in another sheet)

Assume source data is in cols A to C, from row 2 to 200

In E2:
=IF(B2="","",IF(SUMPRODUCT((B$2:B2=B2)*(C$2:C2=C2) )1,"",ROW()))
Leave E1 blank

In F2:
=IF(OR(G2="",H2=""),"",SUMPRODUCT((B$2:B$200=G2)*( C$2:C$200=H2),A$2:A$200))

In G2:
=IF(ROWS($1:1)COUNT($E:$E),"",INDEX(B:B,SMALL($E: $E,ROWS($1:1))))
Copy G2 to H2. Select E2:H2, copy down to H200. Minimize/hide away col E.
Cols F to H will return the exact results that you seek, all neatly bunched
at the top
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
wrote in message
...
I use Excel 2003. I have a 100 row spreadsheet with 3 columns:
Amount, Value A & Value B. What is the easiest way to create a second
3 column spreadsheet where each row is unique Value A - Value B
combination and the 3rd column is the total of every amount in the
original spreadsheet with that particular A-B value.

To illustrate with a simple example, if I start with:

$500 10 265
$200 10 265
$100 20 300
$300 20 300

I want this result:

$700 10 265
$400 20 300

Thanks very much,
Dave



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Adding like rows

Hey Max,
You're a genius. Your formulas worked beautifully.
Thank you!
Dave








On May 13, 4:47 pm, "Max" wrote:

One simple formulas play which should deliver it for you

To keep things neat, let's just take it out in adjacent cols on the same
sheet
(it'll work as well in another sheet)

Assume source data is in cols A to C, from row 2 to 200

In E2:
=IF(B2="","",IF(SUMPRODUCT((B$2:B2=B2)*(C$2:C2=C2) )1,"",ROW()))
Leave E1 blank

In F2:
=IF(OR(G2="",H2=""),"",SUMPRODUCT((B$2:B$200=G2)*( C$2:C$200=H2),A$2:A$200))

In G2:
=IF(ROWS($1:1)COUNT($E:$E),"",INDEX(B:B,SMALL($E: $E,ROWS($1:1))))
Copy G2 to H2. Select E2:H2, copy down to H200. Minimize/hide away col E.
Cols F to H will return the exact results that you seek, all neatly bunched
at the top
--
Max
Singaporehttp://savefile.com/projects/236895
xdemechanik
wrote in message

...

I use Excel 2003. I have a 100 row spreadsheet with 3 columns:
Amount, Value A & Value B. What is the easiest way to create a second
3 column spreadsheet where each row is unique Value A - Value B
combination and the 3rd column is the total of every amount in the
original spreadsheet with that particular A-B value.


To illustrate with a simple example, if I start with:


$500 10 265
$200 10 265
$100 20 300
$300 20 300


I want this result:


$700 10 265
$400 20 300


Thanks very much,
Dave


  #4   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Adding like rows

Welcome, Dave
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
wrote in message
...
Hey Max,
You're a genius. Your formulas worked beautifully.
Thank you!
Dave




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
Adding five new rows every 40 rows in a spreadsheet? Olzki Excel Discussion (Misc queries) 8 May 18th 07 02:14 AM
Adding rows? cambanis Excel Worksheet Functions 3 September 17th 06 10:48 PM
Adding Rows offsets to working rows across two worksheets tom Setting up and Configuration of Excel 3 July 30th 06 07:54 PM
Adding rows cdavis82 Setting up and Configuration of Excel 1 October 25th 05 11:23 PM
Adding Rows Richard Excel Discussion (Misc queries) 1 October 10th 05 03:58 PM


All times are GMT +1. The time now is 12:30 AM.

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

About Us

"It's about Microsoft Excel"