count if text cell matches other text cell

adamhaynes17

New Member
Joined
Mar 22, 2013
Messages
5
Hi...I've been going at this for a while and so I thought I would break down and ask.

I've got one series on a worksheet (worksheet A) that contains text, and I would like to have a total at the bottom of the column that totals the number of cells that match the respective text in another column in a second worksheet. Any thoughts?

apple
pear
lemon
orange
lime
TOTAL MATCHES (3)

<tbody>
</tbody>
worksheet A

apple
watermelon
lemon
orange
cherry

<tbody>
</tbody>
worksheet B
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
that worked great!!! thank you!! quick question...what effect does the "--" have in that formula? i tried sumproduct before, but the two dashes made all the difference.
 
Upvote 0
I'm sure there is a better way to not count the blanks, but you can try...

=SUMPRODUCT((A1:A5=Sheet10!A1:A5)*(NOT(ISBLANK(A1:A5))))


basically the "--" is a unary operator used to convert trues and falses to 1's and 0's.

here's a better explanation Excel SUMPRODUCT Function

 
Upvote 0
Hi...I've been going at this for a while and so I thought I would break down and ask.

I've got one series on a worksheet (worksheet A) that contains text, and I would like to have a total at the bottom of the column that totals the number of cells that match the respective text in another column in a second worksheet. Any thoughts?

apple
pear
lemon
orange
lime
TOTAL MATCHES (3)

<tbody>
</tbody>
worksheet A

apple
watermelon
lemon
orange
cherry

<tbody>
</tbody>
worksheet B

any thoughts on not including empty cells?

Try something like...

=SUMPRODUCT(ISNUMBER(MATCH(A2:A5,SheetB!A2:A6,0))+0)
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,559
Latest member
MrPJ_Harper

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top