Multiple Criteria If Function in Excel

kyceeq

New Member
Joined
Aug 24, 2023
Messages
8
Office Version
  1. 2021
Platform
  1. Windows
Hello everyone, thank you for all your help and assistance on this platform. I am in current need of your help once more. I have been trying to use the 'If' and 'And' function in Excel to create a formula that will show "He or She" based on the following criteria.

Screenshot (31).png

Screenshot (30).png


(a) Cell E13 as Gender
(b) Cell AH42 as pupil's percentage.

I want a situation where if E13 is equal to "MALE or FEMALE" and the pupil's percentage is less than 80%, Cell A42 shows "He or she" depending on the gender selected in E13.

Then the second condition is that A42 will show nothing if AH42 is greater than 80%.

Below is the formula I used but it isn't working.

=IF(AND(E13= "MALE", AH42<80), "He", IF(AND(E13="FEMALE", AH42>80),"",IF(AND(E13="FEMALE", AH42<80), "She", IF(AND(E13="MALE", AH42>80", ""))))

Please help.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
=IF(AH42>0.8, "", If(E13="Male","He","She"))
BUT you may want to do something if E13 is blank
so
=IF(OR(E13="",AH42>0.8), "", If(E13="Male","He","She"))
assuming only Female or Male or blank can be in cell E13

also I have not include an = that will be he or she if E13 = 80%
if thats not what you want add an =
=IF(OR(E13="",AH42>=0.8), "", If(E13="Male","He","She"))
 
Upvote 0
=IF(AH42>0.8, "", If(E13="Male","He","She"))
BUT you may want to do something if E13 is blank
so
=IF(OR(E13="",AH42>0.8), "", If(E13="Male","He","She"))
assuming only Female or Male or blank can be in cell E13

also I have not include an = that will be he or she if E13 = 80%
if thats not what you want add an =
=IF(OR(E13="",AH42>=0.8), "", If(E13="Male","He","She"))
I tried either... didn't work
 
Upvote 0
what happens - didnt work means what exactly ?????

Ah42 has to be below 0.8 - which means a blank cell will be seen as 0 - so also apply
then it will depend on Male in E13 = He - female would be she

i have changed the AH42 - to be H13 - just to show it working and copy down

BUT it does assume that the AH42 is not blank - as that will be seen as 0% and so apply



Book2
BCDEFGH
12
13 male99%
14Shefemale80%
15Hemale70%
16
Sheet1
Cell Formulas
RangeFormula
C13:C15C13=IF(OR(E13="",H13>0.8), "", IF(E13="Male","He","She"))


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

------
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,123,000
Members
449,092
Latest member
masterms

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