ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Checking on two values (https://www.excelbanter.com/excel-discussion-misc-queries/23144-checking-two-values.html)

Johannes B.

Checking on two values
 
To count the numbers of rows that include the number "16" in column "I", I
use the following formula:
ANTALL.HVIS(I:I;"16")
(I think this is called COUNT.IF in english)

I want to count the numbers of rows that include both this and the letter
"A" in column "B". (Meaning not counting rows which just fulfill one of these
requirements.)
How do I write this formula? (Please feel free to write the english formula,
I will find out how to write it in norwegian.)

Regards
Johannes

Harald Staff

Hei Johannes

COUNTIF takes only one criteria. You can do this with
=SUMPRODUCT((B1:B1000="A")*(I1:I1000=16))

på norsk heter den
=SUMMERPRODUKT((B1:B1000="A")*(I1:I1000=16))

There are two things to this though: You need a spesified range of rows,
here 1000 of them. And 16 is a number, "16" is text. SUMIF will include
both, SUMPRODUCT will not.

HTH. Best wishes Harald

"Johannes B." skrev i melding
...
To count the numbers of rows that include the number "16" in column "I", I
use the following formula:
ANTALL.HVIS(I:I;"16")
(I think this is called COUNT.IF in english)

I want to count the numbers of rows that include both this and the letter
"A" in column "B". (Meaning not counting rows which just fulfill one of

these
requirements.)
How do I write this formula? (Please feel free to write the english

formula,
I will find out how to write it in norwegian.)

Regards
Johannes




Rowan

One way:

In cell J1 insert the formula =A2&I2 and copy it down to end of data
Then you can use =Countif(J:J,"A16")

Hope this helds
Rowan

"Johannes B." wrote:

To count the numbers of rows that include the number "16" in column "I", I
use the following formula:
ANTALL.HVIS(I:I;"16")
(I think this is called COUNT.IF in english)

I want to count the numbers of rows that include both this and the letter
"A" in column "B". (Meaning not counting rows which just fulfill one of these
requirements.)
How do I write this formula? (Please feel free to write the english formula,
I will find out how to write it in norwegian.)

Regards
Johannes


Johannes B.

Excelent, thanks!

"Harald Staff" wrote:

Hei Johannes

COUNTIF takes only one criteria. You can do this with
=SUMPRODUCT((B1:B1000="A")*(I1:I1000=16))

på norsk heter den
=SUMMERPRODUKT((B1:B1000="A")*(I1:I1000=16))

There are two things to this though: You need a spesified range of rows,
here 1000 of them. And 16 is a number, "16" is text. SUMIF will include
both, SUMPRODUCT will not.

HTH. Best wishes Harald

"Johannes B." skrev i melding
...
To count the numbers of rows that include the number "16" in column "I", I
use the following formula:
ANTALL.HVIS(I:I;"16")
(I think this is called COUNT.IF in english)

I want to count the numbers of rows that include both this and the letter
"A" in column "B". (Meaning not counting rows which just fulfill one of

these
requirements.)
How do I write this formula? (Please feel free to write the english

formula,
I will find out how to write it in norwegian.)

Regards
Johannes





RAJEEV CHADHA

"?B?Um93YW4=?=" wrote in message ...
One way:

In cell J1 insert the formula =A2&I2 and copy it down to end of data
Then you can use =Countif(J:J,"A16")

Hope this helds
Rowan

"Johannes B." wrote:

To count the numbers of rows that include the number "16" in column "I", I
use the following formula:
ANTALL.HVIS(I:I;"16")
(I think this is called COUNT.IF in english)

I want to count the numbers of rows that include both this and the letter
"A" in column "B". (Meaning not counting rows which just fulfill one of these
requirements.)
How do I write this formula? (Please feel free to write the english formula,
I will find out how to write it in norwegian.)

Regards
Johannes

Hi


All times are GMT +1. The time now is 04:49 PM.

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