Can you post the things I asked for (sample data & formula)?
If this is in a query, you can simply change the Query to SQL View and copy and paste that code here.
I really want to see what your data looks like. From the sounds of it, it sounds like we may be working with a data set that is not Normalized.
Working with data in Access that is not normalized can be VERY cumbersome and problematic.
Also, if the data is in Excel, and you can do a COUNTIF function in Excel, why are you trying to do this in Access instead?
One very important thing to understand is that Excel and Access are NOT interchangeable programs. They are built for very distinctly different purposes.
Access is a relational database program that works best when data is organized in a Normalized manner.
Excel is a spreadsheet program.
While you can design Excel to work like a relational database, it is usually very cumbersome and may be slow/inefficient.
And while you can do some Excel-like calculations in Access, it is really not designed to handle certain Excel functionality easily (like summing across fields).