• Ask an Expert
• Get a Professional Answer
• 100% Satisfaction Guarantee
The-PC-Guy, Computer Manager
Category: Microsoft Office
Satisfied Customers: 1949
Experience:  20 years experience providing remote computer support
62934938
Type Your Microsoft Office Question Here...
The-PC-Guy is online now

# This is a new question hope it works: I am counting data in

This answer was rated:
This is a new question hope it works:
I am counting data in excel, and for this sample I need to Count number of positive cells and number of negative cells. these are counted in a small database about 176 rows long, and I need to filter to count subvalues based on a specific timeperiod. How should i progress?
Thank you for your question, my name is Richard.

It is best for me to look at your current file.

- Click the following link: http://www.wikisend.com
- Upload the file to that website
- Once it is uploaded, the resulting page will display a "File ID" number.
- Please, give me that "File ID Number"

Thank you
Thanks for using JustAnswer. My name isXXXXX will do whatever I can to answer your question

Try this,

=SUBTOTAL(102,A1:A500)

This will count the number of numeric values, and ignore blank and alphanumerics.

It will also update the count as you change the filter.

Change the cell references to match your rows and column numbers.

Let me know if you need anything further on this.
Customer: replied 3 years ago.

Hi can I get the negative cells counted in a separate cell (V7)?

Try this, It is a little more complicated, but it will do what you need.

this will give you the positives

=SUMPRODUCT(--(\$A\$1:\$A\$100>0),SUBTOTAL(3,OFFSET(A1,ROW(\$A\$1:\$A\$100)-ROW(A1),0)))

this will give you the negatives

=SUMPRODUCT(--(\$A\$1:\$A\$100<0),SUBTOTAL(3,OFFSET(A1,ROW(\$A\$1:\$A\$100)-ROW(A1),0)))

Remember to change the rows and colums for what you need, It is is multiple areas now so you will have to change multiple values. Wherever it says A1, leave it as 1, but change the A to whatever column your counting, so for example if you were counting rows B2 to B300 you would change the formula to look like this

=SUMPRODUCT(--(\$B\$2:\$B\$300>0),SUBTOTAL(3,OFFSET(B1,ROW(\$B\$2:\$B\$300)-ROW(B1),0)))

hopefully you get the idea, if you get stuck let me know
Customer: replied 3 years ago.

Yes I am trying it out in a few minutes expect feedback in half an hour

Brgds

Olov

Customer: replied 3 years ago.

I am sorry I cant get it to work for me, probably wrong typing when changing the parameters can you pls check for me

File ID on 466876 on http://www.wikisend.com

Brgds

Olov

I have the file.

Which column do you want the total count of negative numbers from?

Hi ThereIt is very straight forward what you require, you have just been given the wrong formulas.

I have done this for you, and in your Spreadsheet I have done the following

Count of the amount of Negative Cells

Sum of the amount of Negative Values

Count of the amount of Positive Cells

Sum of the amount of Positive Values

The file you can download from wikisend under filer ID 518204

You will see them there.If you have any difficulties at all, please do not hesitate to let me know so I can assist you further

Thank you

Customer: replied 3 years ago.

Hi again, thanks for your assistance. I have tried what you gave me earlier and that worked fine - BUT - going back to my initial question, if I filter in this database as in column C, I would like to see partial results showing the filtered cells only, how do I put that in the formula?

Brgds

Olov

Thanks

this is altered for you

you can download it under File ID 139056

Let me know if you have any difficulties please

Thank you
Hi, I would be happy to fix my original formula for you. Could you tell me which collumn you want to count the values from?

Also to avoid any future confusion please indicate by name which expert you want to work with.
Hi, based on where I see some values and What you said, I will assume you wanted to count the values in column Q. If it needs to be a different or additional columns please let me know.

I also fixed a problem where the results were despairing after you filtered the values I moved the results to W1 - Z1, so they would not disappear after you filter.

Let me know if this is OK

I filtered column C to 2013 to check to make sure it works, and the formulas Auto Update.

you can download the updated file from here.

http://ge.tt/3WoB9uq/v/0?c

Let me know if any more changes need to be made. Also if changes need to be made please indicate by name which expert you wish to work with to avoid any confusion.

Otherwise please rate my service.
The-PC-Guy, Computer Manager
Category: Microsoft Office
Satisfied Customers: 1949
Experience: 20 years experience providing remote computer support
The-PC-Guy and 3 other Microsoft Office Specialists are ready to help you