Referring to text within a cell as part of a COUNTIF formula?

meiirmeiir21

New Member
Joined
Jan 18, 2010
Messages
22
Hello Every body,

I need your help to advice how can i use countif to count multiple criteria s where these criteria s are variable per each row..:
my sheet2 is:
Column A Column B
N1_N2 N2_N1
N1_N3 N3_N1
N1_N4 N4_N1
. .
. .
. .

I need to count at column C the occurring of column A and B Text in a certain range..
for row#1 @ C1 I used
=SUM(COUNTIF(Sheet1!B3:IV151,"*"&{"N1_N2","N2_N1"}&"*")) >>It works fine
but i still need to call N1_N2 & N2_N1 from A1 & B1 ... then i can drag..
Any suggestions?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi
Welcome to the board

Try:

=SUMPRODUCT(COUNTIF(Sheet1!B3:IV151,"*"&CHOOSE({1,2},A1,B1)&"*"))
 
Upvote 0
I'm glad you have it running. It might be possible to change the formula to deal witht the problem, but it would be a more complex formula and your workaround is a simpler solution.
 
Upvote 0

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

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