Not sure if I need OR, AND or IF statement? Can you help?

sobeitjedi

Board Regular
Joined
Mar 13, 2006
Messages
235
Office Version
  1. 365
Hi, I'll try to explain the sheet setup ...

Column F has one of two entries
PROJECT
SCHOOL

Column AB can contain a department code or be blank
MID
CNC
DEA
EDU
PGR
CCT
INT
RIP
(the list of codes goes on)

In column AJ I want a formula that says if column F=school and column AB=INT or MID or EDU or PGR then put 6705 in the cell. If F=School and AB is not INT or MID or EDU or PGR then put 7705 in the cell. Any other combination (ie, where f=project), put 9705 in the cell.

Hope that makes sense and you can help - please!. Thanks.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Try
=IF(AND(F2="School",OR(AB2="INT",AB2="MID",AB2="EDU",AB2="PGR")),6705,IF(F2="School",7705,9705))
 
Upvote 0
Try this (for row 2):
Code:
=IF(F2="SCHOOL",IF(OR(AB2="INT",AB2="MID",AB2="EDU",AB2="PGR"),6705,7705),9705)
 
Upvote 0
Glad to help & thanks for the feedback.
the formula from Joe4 is a lot simpler & probably better
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,147
Members
449,098
Latest member
Doanvanhieu

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