![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Posts: 72
|
Hi, I've struggled with this and couldn't
see it in a previous thread, so over to the experts I have a column of figures and I would like to use COUNTIF to count all the values between 1 and -1. How can I do this, rather than adding another IF column and counting the results. Thanks in advance |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
Quote:
=SUMPRODUCT((A1:A100<=1)*(A1:A100>=-1))
__________________
"Have a good time......all the time" Ian Mac |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Midlands, UK
Posts: 217
|
Or :
=COUNT(IF(C1:C10<=1,IF(C1:C10>=-1,C1:C10))) entered as an array ( control + shift + enter ) |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 390
|
I'm not sure what you're asking for.
If you mean the number of cells, Ian mAc's answer is correct. If you mean the sum of the values between -1 en +1 (so -1 and +1 not included), you can use: =SUMIF(A1:A10,">=-1")-SUMIF(A1:A10,">1") [ This Message was edited by: Albert 1 on 2002-05-22 05:10 ] |
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Newcastle, UK
Posts: 1,174
|
Quote:
=SUMPRODUCT((A1:A100<=1)*(A1:A100>=-1),A1:A100)
__________________
"Have a good time......all the time" Ian Mac |
|
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Posts: 72
|
Thanks guys, I've used Ian Mac's SUMPRODUCT which has worked just fine. I'll try out the array version later.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|