ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to add numbers in adjacent cells (https://www.excelbanter.com/excel-discussion-misc-queries/197173-how-add-numbers-adjacent-cells.html)

dj

How to add numbers in adjacent cells
 
I have a sheet with days of week in one column and values in adjacent cells;
I need to work out the total for each day of the week - see below for example:
Monday 1000
Tuesday 2000
Wednesday 3000
Monday 500
Tuesday 2000
Wednesday 5000

Totals would be 1500, 4000 & 8000 but what is the formula to do this?
--
DJ

Bob Phillips

How to add numbers in adjacent cells
 
=SUMIF(A:A,"Monday",B:B)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"DJ" wrote in message
...
I have a sheet with days of week in one column and values in adjacent
cells;
I need to work out the total for each day of the week - see below for
example:
Monday 1000
Tuesday 2000
Wednesday 3000
Monday 500
Tuesday 2000
Wednesday 5000

Totals would be 1500, 4000 & 8000 but what is the formula to do this?
--
DJ




Jarek Kujawa[_2_]

How to add numbers in adjacent cells
 
presuming D10=Monday, D11=Tuesday, D12=Wednesday and days in A10:A15,
numbers in B10:B15

one way:

=SUMPRODUCT((D10=$A$10:$A$15)*$B$10:$B$15)

another:

=SUM(IF((D10=$A$10:$A$15)*($B$10:$B$15),$B$10:$B$1 5,))
this one is an array-formula so CTRL+SHIFT+ENTER it instead of simpy
using enter


All times are GMT +1. The time now is 05:35 PM.

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