IF statement problem

bibstar03

New Member
Joined
Jan 30, 2003
Messages
25
There are 3 cells invlved in my problem, one cell which holds gender and one which holds age, in the last cell i want either yes or no to appear.

it should read yes if male betweem 18 and 40 and no if female or not within the age group.

how can i do this if statement based on 2 bits of data?

thank you
 

Some videos you may like

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,048
Office Version
  1. 365
Platform
  1. Windows
Try this

=IF(AND(A1="M", B1>18, B2<40), "Yes", "No")
 

Watch MrExcel Video

Forum statistics

Threads
1,118,167
Messages
5,570,639
Members
412,334
Latest member
ExcelForLifeDontHate
Top