Formula: count co occurrence of elements of 2 columns in one row.

Vlad_2019

New Member
Joined
Apr 1, 2019
Messages
1
Dear community,

I need a formula that would count how many times an element of one column co-occurs with another element in each row. The input is represented in Figure 1. The result (see Figure 2) could look as follows. The formula counts how many times H* co-occurs with n and p. In this case, it would be 1 for n and 2 for p. The same calculation would be performed with L+H*. I think that the countifformula can be applied here however, I do not know how to create a link between the two elements, n and p.

=COUNTIF(F2:F343; "H*"//how to link it with p/n?).

I am glad about every feedback and would be very grateful if you could help me. I work with a rather big data bank and. It is barely possible to count the elements manually and without making a mistake.


Figure 1:
pre-nuclear/ nuclearSymbol
pH*
nL+H*
pH*
pL+H*
nH*

<tbody>
</tbody>

Figure 2:
Symbolnp
H*12
L+H*11

<tbody>
</tbody>
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi & welcome to MrExcel.
How about


Excel 2013/2016
ABCDEF
1pre-nuclear/ nuclearSymbolSymbolnp
2pH*H*12
3nL+H*L+H*11
4pH*
5pL+H*
6nH*
Data
Cell Formulas
RangeFormula
E2=COUNTIFS($B$2:$B$6,$D2,$A$2:$A$6,E$1)
 
Upvote 0

Forum statistics

Threads
1,213,485
Messages
6,113,931
Members
448,533
Latest member
thietbibeboiwasaco

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