Reputation: 71
In sheet 1
, in cells G26
, G45
, G65
, G85
, I have the word "ok". In sheet 2
, in cell A1
, I want to count the number of occurrences of the word "ok" from the specified cells in sheet 1
. Somehow, using countif
or SUM(countifs)
returns that this is not a function or #value? in the A1
cell in sheet 2.
Any ideas what I'm doing wrong?
used:
SUM(COUNTIFS(SHEET1!G26:G45:G65:G85,"OK")
and
COUNTIF(SHEET1!G26:G45:G65:G85, "OK)
None of these two work
Upvotes: 0
Views: 33
Reputation: 6368
COUNTIF
will only accept a single range.
Try:
=COUNTIF(SHEET1!G26:G85, "OK")
or:
=COUNTIF(SHEET1!G26:G45, "OK") + COUNTIF(SHEET1!G65:G85, "OK")
If you really must not count the cells in G46:G64
Upvotes: 3
Reputation: 17493
What about this:
=CountIF(SHEET1!G26:G85;"OK")
(Mind the semicolon instead of the comma)
For your information: G26:G85 means "take all the cells from G26 to G85", it does not mean "take G26 and G85", hence I didn't put the other cells, as they are in the range from G26 to G85.
Upvotes: 0