Counting with 2 conditions

Outline

New Member
Joined
Mar 25, 2009
Messages
20
Hello,

I need to count the word "upper" in two ranges, whether "upper" appears in column L or in column n, or both. I need to know the unique number of "uppers" for 2300+ records.

L2:l2335 and n2:n2335


EX:
L column N column COMMENTARY
record 1 upper upper This would count as 1
record 2 upper 800 This would be 1
record 3 798 "under" This would be 0

therefore, my total count would be 2


Can you help with the correct formula, please
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Thanks, worked


However, can I use one formula (such as countif) without adding a separate column to sum?
 
Upvote 0
Hello,

I need to count the word "upper" in two ranges, whether "upper" appears in column L or in column n, or both. I need to know the unique number of "uppers" for 2300+ records.

L2:l2335 and n2:n2335


EX:
L column N column COMMENTARY
record 1 upper upper This would count as 1
record 2 upper 800 This would be 1
record 3 798 "under" This would be 0

therefore, my total count would be 2


Can you help with the correct formula, please

Try...

=SUMPRODUCT((ISNUMBER(SEARCH("upper",L2:L18))+ISNUMBER(SEARCH("upper",N2:N18))>0)+0)

Adjust the ranges to suit...
 
Upvote 0
=(SUMPRODUCT(--(L2:L2335="upper"))+SUMPRODUCT(--(N2:N2335="upper")))-(SUMPRODUCT(--(L2:L2335="upper")*(N2:N2335="upper")))

edvwvw
 
Upvote 0
Hello,

I need to count the word "upper" in two ranges, whether "upper" appears in column L or in column n, or both. I need to know the unique number of "uppers" for 2300+ records.

L2:l2335 and n2:n2335


EX:
L column N column COMMENTARY
record 1 upper upper This would count as 1
record 2 upper 800 This would be 1
record 3 798 "under" This would be 0

therefore, my total count would be 2


Can you help with the correct formula, please
Try this...

P2 = upper

=SUMPRODUCT(SIGN(ISNUMBER(SEARCH(P2,L2:L10))+ISNUMBER(SEARCH(P2,N2:N10))))
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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