I predict mark will beat me this time. Use
=COUNTIF(A1:A3,"bird")
to count the number of birds in A1 through A3
Yes, but i only want to count the number "birds" if there is a figure in a cell next to it.
Denis
I think I misunderstood. Do you have a little sample data you could provide?
Yes, how do i send it through?
Use the formula
=SUM((A1:A3="bird")*(ISNUMBER(B1:B3)))
As this is an array formula, hit control shift and enter at the same time. You know you've done it correctly if brackets are placed around the formula by excel.
Good luck.
I can't get it to work, I'm not really sure what you mean about control, shift and enter at the same time.
D
Trying to beat Ian on this one...
Array-enter
=SUM((A1:A22="bird")*(ISNUMBER(B1:B22)))
In order to arrayenter a formula, you need to hit CONTROL+SHIFT+ENTER at the same time (not just ENTER).
I interpreted "a figure" as any number. I interested in a particular number, change
ISNUMBER(B1:B22) to B1:B22=45 where 45 is an example.
Aladin
If you are typing it in, don't just hit enter. Hit enter while control and shift are depressed.
If you are copying and pasting it, hit F2, then enter whil control and shift are depressed.
If you are getting a #value! error, you are very close.
Hope that helps.