Help with a nested function.

1. Help with a nested function.

Help,

Here is the problem. I have two columns of data. for example:

Column A
1
3
4
0
2
0
0
3

Column B
Product A
Product A
Product B
Product B
Product A
Product A
Product B
Product B

What I need the function to return is:
Product A - 3
Product B - 2

This is what I thought the function should look like but it is not working:

=IF(A6:A50>0,COUNTIF(A6:A50,"Product A"),0)

If Product A or B did not have any values >0, it would return a zero.

Thanks for any help!

2. Re: Help with a nested function.

``Please Login or Register  to view this content.``
To elaborate on the IF approach you would need to use an array entered within CTRL + SHIFT + ENTER:

``Please Login or Register  to view this content.``

3. Re: Help with a nested function.

Try sumproduct

=Sumproduct((\$B\$1:\$B\$10="Product A")*(\$A\$1:\$A\$10>0))

You can also replace "Product B" with cell referencing it so that you can copy formula down

4. Re: Help with a nested function.

Holy cow that was fast! Thanks Guys!

5. Re: Help with a nested function.

How to mark a thread Solved
Go to the first post
Click edit
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save

There are currently 1 users browsing this thread. (0 members and 1 guests)