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
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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
 
Upvote 0
If you want to include the A*s in the count use:
=SUMPRODUCT((MID(C2:H8,1,1)="A")*(B2:B8<>"M"))
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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