COUNTIF Formula Help

New Contributor


I am fairly new to working with Excel so please forgive me if this is a silly question. I have a set of data values in B2:G20. Let's say in row B20:G20 I have 2 values that match the values in the data set. How can I create a reference formula to count the number of values that appear ( Number of Hits column) in the row that match with the data set? 



Screen Shot 2019-01-06 at 2.48.11 PM.png


Screen Shot 2019-01-06 at 2.50.11 PM.png




I created the following but realized that I need a formula for a value in the data set that changes frequently.

=COUNTIF(B20:G20,"=48") + COUNTIF(B20:G20,"=43") + COUNTIF(B20:G20,"=24") + COUNTIF(B20:G20,"=8") + COUNTIF(B20:G20,"=17")


Thank you for any assistance!

2 Replies




NOTE: hope that it is not used  to check lottery result.

Thank you! Looks like I need to dig deeper into understanding arrays. Also no worries about lotto results, losing money is not my thing lol
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
50 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
32 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
15 Replies
Dev channel update to 80.0.355.1 is live
josh_bodner in Discussions on
67 Replies