Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

countif or sumif formula tricky one

Posted on 2014-02-10
6
235 Views
Last Modified: 2014-02-10
Hi Experts excel 2007

I am trying to count the number of results between set dates..I have the following table.

col A.         Col B. Case 1.       Col C Result
1.                             6.                  Sum of values falling into 1-3 cat based on colA
2.                             5
3.                             8
4.                             1.                  Sum of val <4 based on col A
5.                             2
6.                             9
7.                            10
0
Comment
Question by:route217
  • 3
  • 2
6 Comments
 
LVL 29

Expert Comment

by:gowflow
ID: 39846880
a bit not clear
counting results between set dates but see no dates here.
then
Sum of values falling into 1-3 cat based on colA
of what of Col B ?

 Sum of val <4 based on col A
also not clear

then
Col A is figures 1,2,3,4 etc.... ? or  ? what is the point for ?

can you post a sample workbook ?
gowflow
0
 

Author Comment

by:route217
ID: 39846888
Hi gowflow

question1. Sum of values falling into 1-3 cat based on colAof what of Col B ?
answer. 6+5+8=19...
I am using col a as a ref table.

Also the count would be 3 records. ..
0
 
LVL 50

Assisted Solution

by:Rgonzo1971
Rgonzo1971 earned 250 total points
ID: 39846935
Hi,

pls try

=SUMIF(A1:A7,"<=3",B1:B7)

Open in new window

and
=COUNTIF(A1:A7,"<=3")

Open in new window

Regards
Sumif3.xlsx
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 29

Accepted Solution

by:
gowflow earned 250 total points
ID: 39846942
ok here it is you should use SUMIFS

for >=1 and <=3 this is the formula
=SUMIFS(B2:B8,A2:A8,">=1",A2:A8,"<=3")

for<4 this is the formula
=SUMIFS(B2:B8,A2:A8,"<4")

and you can see it in the attached file.
gowflow
SUMIFS.xlsx
0
 

Author Comment

by:route217
ID: 39846948
Gowflow excellent feedback. ..how would I do the count..
0
 
LVL 29

Expert Comment

by:gowflow
ID: 39846949
Well read it again and although you said SUM of values for <4 but then you give the result of 3 then it is no more a SUMIFS but a COUNT

so for <4
=COUNTIFS(A1:A7,"<=3")

You can use them without the S at the end as well but I prefer these as they open the door for multiple criteria if and when needed.
gowflow
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question