Count column b if column a contains value and column b contains another value

cckcmiller

New Member
Joined
Sep 3, 2014
Messages
3
l
/ lc/ x r2/ ls/ h55a22l/ r102xx5

<colgroup><col span="30" width="23"></colgroup><tbody>
</tbody>

using line like above looking to count all columns that are "l" and where the next column is "/".

Completely at a loss. Count count the "l"'s and can also count the "/"'s but need to count where both are met.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Welcome to Mr Excel

Maybe...

=SUMPRODUCT(--(A1:AC1="l"),--(B1:AD1="/"))

Hope this helps

M.
 
Upvote 0
Thanks Marcelo

When I add that to my equation I get the answer of "1". As you can see in the example the answer should be "2".
 
Upvote 0
Worked for me


A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
AA
AB
AC
AD
1
l​
/​
lc​
/​
x​
r2​
/​
ls​
/​
h​
5​
5​
a​
2​
2​
l​
/​
r​
10​
2​
x​
x​
5​
2
3
Counting​
4
2​

<tbody>
</tbody>


Formula in A4
=SUMPRODUCT(--(A1:AC1="l"),--(B1:AD1="/"))

M.
 
Upvote 0

Forum statistics

Threads
1,203,663
Messages
6,056,620
Members
444,878
Latest member
SoupLaura

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