ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula to count numbers of certain values (https://www.excelbanter.com/excel-worksheet-functions/9092-formula-count-numbers-certain-values.html)

Ripple919

formula to count numbers of certain values
 
I created a workshett some time ago with the help of someone here in the news
group. The goal was to count employees who made between 8 and 9 dollars and
hour, between nine and 10 dollars an hour etc. The formula looked like this
=SUM((K$4:K$111=8)*(K$4:K$111<9)) Then you hit some keys at the end to make
excel change it to look like this {=SUM((K$4:K$111=8)*(K$4:K$111<9))} I
can't for the life of me remember what keys to hit so that it puts that
around it. With out it it just returns an error. Help please!

Bob Phillips

Ctrl-Shift-Enter, as it is an array formula.

But you could use

=SUMPRODUCT(--(K$4:K$111=8).--(K$4:K$111<9))

which is not an array formula, so only needs Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ripple919" wrote in message
...
I created a workshett some time ago with the help of someone here in the

news
group. The goal was to count employees who made between 8 and 9 dollars

and
hour, between nine and 10 dollars an hour etc. The formula looked like

this
=SUM((K$4:K$111=8)*(K$4:K$111<9)) Then you hit some keys at the end to

make
excel change it to look like this {=SUM((K$4:K$111=8)*(K$4:K$111<9))} I
can't for the life of me remember what keys to hit so that it puts that
around it. With out it it just returns an error. Help please!




Aladin Akyurek

Control+shift+enter.

Alternatively, using the usual enter...

=COUNTIF(K$4:K$111,"=8")-COUNTIF(K$4:K$111,"=9")

=COUNTIF(K$4:K$111,"="&X4)-COUNTIF(K$4:K$111,"="&Y4)

with X4 set to 8 and Y4 to 9.

Ripple919 wrote:
I created a workshett some time ago with the help of someone here in the news
group. The goal was to count employees who made between 8 and 9 dollars and
hour, between nine and 10 dollars an hour etc. The formula looked like this
=SUM((K$4:K$111=8)*(K$4:K$111<9)) Then you hit some keys at the end to make
excel change it to look like this {=SUM((K$4:K$111=8)*(K$4:K$111<9))} I
can't for the life of me remember what keys to hit so that it puts that
around it. With out it it just returns an error. Help please!


Ripple919

Thank you!!! It works again!

"Bob Phillips" wrote:

Ctrl-Shift-Enter, as it is an array formula.

But you could use

=SUMPRODUCT(--(K$4:K$111=8).--(K$4:K$111<9))

which is not an array formula, so only needs Enter.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ripple919" wrote in message
...
I created a workshett some time ago with the help of someone here in the

news
group. The goal was to count employees who made between 8 and 9 dollars

and
hour, between nine and 10 dollars an hour etc. The formula looked like

this
=SUM((K$4:K$111=8)*(K$4:K$111<9)) Then you hit some keys at the end to

make
excel change it to look like this {=SUM((K$4:K$111=8)*(K$4:K$111<9))} I
can't for the life of me remember what keys to hit so that it puts that
around it. With out it it just returns an error. Help please!






All times are GMT +1. The time now is 07:12 AM.

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