Sumifs

mypig7

Active Member
Joined
Sep 27, 2004
Messages
285
I have 2 columns on Sheet 2

In column A it says Mon all the way down to A10
Then Tues for a few more cells below, then Weds for a few cells and so on.
The list is sorted in order

To the right in Column B some cells have numbers in them and some are blank
On Sheet 1 I want a summary, so it would say:

"Mon" in one cell (say in A1)
And to the right of Mon a sum of the cells that appear next to Mon in Column B (Sheet 2) that have something in them.

How do I do it?

Tried a combination of AND, SUMIFS and am not getting there

I tried this with no joy on sheet 1:

=SUMIFS(Sheet2!B:B,Sheet2!A:A,"Mon",Sheet2!B:B,">0")
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
a sum of the cells

Do you mean you want to count the number of cells that fulfill the criteria?

If so - maybe you can try like this.

=COUNTIFS(Sheet2!A:A,"Mon",Sheet2!B:B,">0")

Or with "Mon" in A1

=COUNTIFS(Sheet2!A:A,A1,Sheet2!B:B,">0")
 
Upvote 0
Then the formula you have should work, although if you aren't specifically trying to exclude negative values from the sum you don't need the second criteria.

Perhaps you can expand on "no joy" - are you getting an error, or a wrong result or something else?


Book1
A
118
Sheet1
Cell Formulas
RangeFormula
A1=SUMIFS(Sheet2!B:B,Sheet2!A:A,"Mon",Sheet2!B:B,">0")



Book1
AB
1Mon1
2Mon
3Mon10
4Mon
5Mon6
6Mon
7Mon1
Sheet2
 
Upvote 0
Hi, I just get 0 as the answer, when there are def figs in the cells that can be added up
 
Upvote 0
Are the values in column A really text values like "Mon", or are they dates with custom formats?

If you apply the LEN function to one of the entries with "Mon" in it, what do you get?
So, if cell A2 has "Mon", enter this formula somewhere and tell us what it returns:
=LEN(A2)
 
Upvote 0

Forum statistics

Threads
1,223,785
Messages
6,174,539
Members
452,571
Latest member
MarExcelTips

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top