ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding everything but last cell (https://www.excelbanter.com/excel-discussion-misc-queries/44215-adding-everything-but-last-cell.html)

Anthony Slater

Adding everything but last cell
 
Hi

Col A contains serial numbers. These maybe be repeated
Col B Contains Dates
Col C Contains Price

Serial
123 12-03-05 50.25
123 13-03-05 45.20
123 14-03-05 50.15
123 15-03-05 30.20
456 11-04-05 15.25
456 12-04-05 41.25
789 08-02-05 16.20
789 09-02-05 12.30
789 12-02-05 15.30

How can I sum up each of the prices except the last one in each case?

the answer for serial 123 should be 145.60
the answer for serial 456 should be 15.25
the answer for serial 789 should be 28.50


Any help appreciated

Don Guillett

one way

=SUMIF(B1:B21,2)-INDEX(B1:C21,MATCH(2,B1:B21),2)
--
Don Guillett
SalesAid Software

"Anthony Slater" wrote in message
...
Hi

Col A contains serial numbers. These maybe be repeated
Col B Contains Dates
Col C Contains Price

Serial
123 12-03-05 50.25
123 13-03-05 45.20
123 14-03-05 50.15
123 15-03-05 30.20
456 11-04-05 15.25
456 12-04-05 41.25
789 08-02-05 16.20
789 09-02-05 12.30
789 12-02-05 15.30

How can I sum up each of the prices except the last one in each case?

the answer for serial 123 should be 145.60
the answer for serial 456 should be 15.25
the answer for serial 789 should be 28.50


Any help appreciated




Anthony Slater

Thanks Don for you help...really appreciated

"Don Guillett" wrote:

one way

=SUMIF(B1:B21,2)-INDEX(B1:C21,MATCH(2,B1:B21),2)
--
Don Guillett
SalesAid Software

"Anthony Slater" wrote in message
...
Hi

Col A contains serial numbers. These maybe be repeated
Col B Contains Dates
Col C Contains Price

Serial
123 12-03-05 50.25
123 13-03-05 45.20
123 14-03-05 50.15
123 15-03-05 30.20
456 11-04-05 15.25
456 12-04-05 41.25
789 08-02-05 16.20
789 09-02-05 12.30
789 12-02-05 15.30

How can I sum up each of the prices except the last one in each case?

the answer for serial 123 should be 145.60
the answer for serial 456 should be 15.25
the answer for serial 789 should be 28.50


Any help appreciated





Don Guillett

glad it helped

--
Don Guillett
SalesAid Software

"Anthony Slater" wrote in message
...
Thanks Don for you help...really appreciated

"Don Guillett" wrote:

one way

=SUMIF(B1:B21,2)-INDEX(B1:C21,MATCH(2,B1:B21),2)
--
Don Guillett
SalesAid Software

"Anthony Slater" wrote in

message
...
Hi

Col A contains serial numbers. These maybe be repeated
Col B Contains Dates
Col C Contains Price

Serial
123 12-03-05 50.25
123 13-03-05 45.20
123 14-03-05 50.15
123 15-03-05 30.20
456 11-04-05 15.25
456 12-04-05 41.25
789 08-02-05 16.20
789 09-02-05 12.30
789 12-02-05 15.30

How can I sum up each of the prices except the last one in each case?

the answer for serial 123 should be 145.60
the answer for serial 456 should be 15.25
the answer for serial 789 should be 28.50


Any help appreciated








All times are GMT +1. The time now is 08:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com