ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automatic sum of a column when the other column has the same vaule (https://www.excelbanter.com/excel-discussion-misc-queries/196502-automatic-sum-column-when-other-column-has-same-vaule.html)

Andy

Automatic sum of a column when the other column has the same vaule
 
Is there an easier way to make the same date only show in one column and add
the hours of the same dates together in that column than to do it all one by
one???

Date Hours
2008/03/26 1.50
2008/03/26 7.50
2008/03/26 1.50
2008/03/27 1.00
2008/03/27 10.50
2008/03/28 8.00
2008/03/28 1.00
2008/03/28 5.00


RagDyeR

Automatic sum of a column when the other column has the same vaule
 
Enter the date you wish to total in say C1, then try this:

=SUMIF(A2:A9,C1,B2:B9)

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Andy" wrote in message
...
Is there an easier way to make the same date only show in one column and

add
the hours of the same dates together in that column than to do it all one

by
one???

Date Hours
2008/03/26 1.50
2008/03/26 7.50
2008/03/26 1.50
2008/03/27 1.00
2008/03/27 10.50
2008/03/28 8.00
2008/03/28 1.00
2008/03/28 5.00



Joerg Mochikun

Automatic sum of a column when the other column has the same vaule
 
Maybe using the menu: Data - Subtotals
JM

"Andy" wrote in message
...
Is there an easier way to make the same date only show in one column and
add
the hours of the same dates together in that column than to do it all one
by
one???

Date Hours
2008/03/26 1.50
2008/03/26 7.50
2008/03/26 1.50
2008/03/27 1.00
2008/03/27 10.50
2008/03/28 8.00
2008/03/28 1.00
2008/03/28 5.00




Andy

Automatic sum of a column when the other column has the same v
 
Thanx MAx you're a legend. :P

Max

Automatic sum of a column when the other column has the same vaule
 
A pivot table can get you there in a matter of seconds

Assuming the table posted is in cols A & B,
data from row2 down, with real dates in col A

Steps (in xl2003)
Select any cell within the data,
click Data PivotTable...
Click NextNext
In step 3 of the wiz, click Layout
Drag n drop "Date" within ROW area
Drag n drop "Hours" within DATA area
Click OK Finish. That's it!

Hop over to the pivot in the new sheet to the left,
where it'll show all the unique dates in the left col,
with corresponding total hours next to it.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,200 Files:354 Subscribers:53
xdemechanik
---
"Andy" wrote:
Is there an easier way to make the same date only show in one column and add
the hours of the same dates together in that column than to do it all one by
one???

Date Hours
2008/03/26 1.50
2008/03/26 7.50
2008/03/26 1.50
2008/03/27 1.00
2008/03/27 10.50
2008/03/28 8.00
2008/03/28 1.00
2008/03/28 5.00


Max

Automatic sum of a column when the other column has the same v
 
Welcome, glad it helped.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 16,200, Files: 354, Subscribers: 53
xdemechanik
---
"Andy" wrote in message
...
Thanx Max you're a legend. :P




Andy

Multiple columns in a pivot table
 
Hey max your help was so good yesterday id like to ask you another question.

date total date reg date irreg
06/06/08 1.50 06/06/08 1.50 07/06/08 4.50
07/06/08 4.50 09/06/08 4.50 09/06/08 8.00
09/06/08 12.50 10/06/08 8.00 13/06/08 3.50
10/06/08 8.00 11/06/08 4.50 15/06/08 10.75
11/06/08 4.50 13/06/08 2.00 16/06/08 8.00
13/06/08 5.50 19/06/08 8.00 19/06/08 11.00
15/06/08 10.75
16/06/08 8.00
19/06/08 19.00


How do i put this into 1 pivot table so i get:
date total reg irreg
xxx xx xx xx
xxx xx xx xx



Max

Multiple columns in a pivot table
 
Suggest that you post new queries afresh
So that it's visible to all responders
That's the best way to effectively use these newsgroups
--
Max
Singapore
http://savefile.com/projects/236895
Downloads: 16,300, Files: 356, Subscribers: 53
xdemechanik
---




All times are GMT +1. The time now is 04:58 PM.

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