Is this possible?

alombia

Board Regular
Joined
Jan 14, 2016
Messages
89
Hi all,

I have the following sheet:
ABCDEFGHI
1NameGenderLevel 1Level 2Level 3Level 4Level 4Level 5
2JohnMA*BAAFC
3AliMACBDEC
4MikeMBDA*CAA
5PaulineFCEABA*A
6HarrisMDFDA*BA*
7NasimaFBGGECB
8LubaFCBFADC
9
10

<tbody>
</tbody>

I have named A1:H8 as Scores.
I am counting the occurrences of each of the letters (A, B, C, etc). That is easy enough for me. However, I would like to exclude rows from this range based on Gender. In others, I would like to first count the occurrence of A in the full range (which i can do). Then count A in the range, but this time exclude any row which has M in the Gender column. Hope this makes sense.
Thanks
 

Some videos you may like

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

AhoyNC

Well-known Member
Joined
Oct 10, 2011
Messages
4,719
Office Version
  1. 365
Platform
  1. Windows
Try:
Excel Workbook
ABCDEFGH
1NameGenderLevel 1Level 2Level 3Level 4Level 4Level 5
2JohnMA*BAAFC
3AliMACBDEC
4MikeMBDA*CAA
5PaulineFCEABA*A
6HarrisMDFDA*BA*
7NasimaFBGGECB
8LubaFCBFADC
9
103
Sheet
 

mopp1

Board Regular
Joined
Apr 4, 2017
Messages
74
If you want to include the A*s in the count use:
=SUMPRODUCT((MID(C2:H8,1,1)="A")*(B2:B8<>"M"))
 

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
If you want to include the A*s in the count use:
=SUMPRODUCT((MID(C2:H8,1,1)="A")*(B2:B8<>"M"))

LEFT would be more succinct:

=SUMPRODUCT((LEFT(C2:H8)="A")*(B2:B8<>"M"))
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,122,233
Messages
5,594,964
Members
413,955
Latest member
FalcoDaz

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
Top