counting 2 words in 1 row

mwvirk

Active Member
Joined
Mar 2, 2011
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
i want to find 2 words in 1 row and count the total using if condition. but don't know what is the problem here:
=COUNTIFS(X4:X230,"Resolved",X4:X230,"Pending")

pls note that above mentioned row range already contains some other formulas.
thnx
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Countifs counts only if BOTH conditions are TRUE
NOT if one OR the other is True

Try

=SUMPRODUCT(--(ISNUMBER(SEARCH({"Resolved","Pending"},X4:X230))))


Change Search to Find if you want it to be case sensitive.


Hope that helps.
 
Upvote 0
i want to find 2 words in 1 row and count the total using if condition. but don't know what is the problem here:
=COUNTIFS(X4:X230,"Resolved",X4:X230,"Pending")

pls note that above mentioned row range already contains some other formulas.
thnx
Try one of these...

=SUM(COUNTIF(X4:X230,{"Resolved","Pending"}))

This version gives you more flexibilty by using cells to hold the criteria:
  • A1 = Resolved
  • A2 = Pending
=SUMPRODUCT(--(ISNUMBER(MATCH(X4:X230,A1:A2,0))))
 
Upvote 0
Try one of these...

=SUM(COUNTIF(X4:X230,{"Resolved","Pending"}))


This version gives you more flexibilty by using cells to hold the criteria:
  • A1 = Resolved
  • A2 = Pending
=SUMPRODUCT(--(ISNUMBER(MATCH(X4:X230,A1:A2,0))))
Of course, you could always do:

=COUNTIF(X4:X230,A1)+COUNTIF(X4:X230,A2)
 
Upvote 0
thanks. its working fine. but since we are talking about case sensitive (which i like bcoz i want these words in proper order)

can u help me here: =COUNTIF(X4:X230,"Resolved")
formula/condition is ok. only i want to use case sensitive search
thnx
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,717
Members
452,939
Latest member
WCrawford

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