1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Countif only no-whole numbers

Our take

To accurately count the number of products in your categorized database without tallying the category headers, you can utilize the COUNTIF function effectively. Instead of adding a separate column, consider using a single formula that filters out whole numbers. For instance, you can apply a formula like `=COUNTIF(A:A, ">0") - COUNTIF(A:A, ">=2")` to count only the subcategories. This approach streamlines your data management while ensuring that your counts remain accurate and free from potential errors in future updates.

I have a database with numbered categorized products like so.

1.00 Food

1.01 Rice

1.02 Meat

1.03 Potato

2.00 Clothes

2.01 Pants

2.02 Shirts

I need to check how many products there are, meaning that the category headers (the ones with whole numbers) should not be counted. In the example the correct output would be "5".

I tried to use a countif + if function but i ended up having to use another column to make it work and that will create bugs in the future, any ideas on how to tackle this?

Edit: spelling

submitted by /u/SoftPristine8593
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Tagged with

#financial modeling with spreadsheets#rows.com#Excel compatibility#Excel alternatives for data analysis#Excel alternatives#countif#database#categorized products#whole numbers#category headers#count#function#products#if statement#output#column#bugs#ideas#example#spelling