Excel formula

doris.barrett

New Member
Joined
Sep 19, 2002
Messages
1
Need to check a range of cells = 4 or 5 and return the number of cells that meet the condition.
This message was edited by doris.barrett on 2002-09-20 11:16
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
COUNTIF(range,criteria)
example: CountIf(A1:A40,4)

This is really nice expecially if you only need it to count if you have a reason but it counts by itself too
 
Upvote 0
1. try countif =COUNTIF(A1:F4,4)+COUNTIF(A1:F4,5)

with criteria in G7 and G8
=COUNTIF(A1:F4,G7)+COUNTIF(A1:F4,G8)

or

2 SumProduct
=SUMPRODUCT((A3:F3={4;5})+0)
with criteria in G7:G8
=SUMPRODUCT((A3:F3=G7:G8)+0)
or
=SUMPRODUCT((C1:C4={4,5})+0)
or with criteria in G7:H7
=SUMPRODUCT((C1:C4=G7:H7)+0)

Adjust the references as necessary.
 
Upvote 0

Forum statistics

Threads
1,214,899
Messages
6,122,155
Members
449,068
Latest member
shiz11713

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top