If and or functions help!!!

martyloo

Board Regular
Joined
Sep 29, 2010
Messages
100
EXCEL 2010

I am trying to do the following IF in sheet "Main Console"

cell "E19" displays an 11 and "F19" Displays a 9
OR
cell "E19" displays a 9 and "F19" displays an "11"
AND
cell "G19" displays a 3

show the following - 20% otherwise display blank

Here are the formula's I have tried so far but have not worked.......

=IF('Main Console'!G19=3,AND(OR('Main Console'!E19=11,'Main Console'!F19=9,'Main Console'!E19=9,'Main Console'!F19=11),0.2,""))

=IF('Main Console'!G19=3,AND('Main Console'!E19=11,'Main Console'!F19=9,OR('Main Console'!F19=11,'Main Console'!E19=9),0.2,""))

=IF(OR('Main Console'!E19=11,'Main Console'!F19=9,'Main Console'!F19=11,'Main Console'!E19=9)*AND('Main Console'!G19=3),0.2,"")

The bottom one worked however regardelss of what is in cells E19 and F19 if G19 had a 3 in it, it would display all the % I had for other if functions involving that G19 cell with a 3

Please help as I am now clueless........
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Try:
Code:
=IF('Main Console'!G19<>3,"",IF(AND(OR('Main Console'!E19=11,'Main Console'!E19=9),OR('Main Console'!F19=9,'Main Console'!F19=11)),20%,""))
 
Upvote 0
Your knowledge is amazing I genuinely thought this would be a problem not easy to solve, and it took seconds.

Thank you once again JackDanIce
 
Upvote 0
And amir's suggestion looks even more compact, bit annoyed I didn't spot that!
 
Upvote 0
Out of interest/curiosity, are the values of 9 and 11 the only ones E19 and F19 can take? If so then the formula could be reduced down to:
Code:
=IF(SUM('Main Console'!E19:G19)=23,20%,"")
E.g.
E19 = 9, F19 = 11, G19 = 3
SUM(E19:G19) = 23 - TRUE

E19 = 9, F19 = 9, G19 = 3
SUM(E19:G19) <> 23 - FALSE

E19 = 11, F19 = 11, G19 = 3
SUM(E19:G19) <> 23 - FALSE

E19 = 9, F19 = 11, G19 = 4
SUM(E19:G19) <> 23 - FALSE
 
Upvote 0
This may work too then:
Code:
=IF(AND(AND('Main Console'!E19+F19=20,ABS('Main Console'!E19-F19)=2),G19=3),20%,"")
 
Upvote 0
Unless I misread something, this matches your original criteria,
Excel Workbook
EFGH
1993 
211930.2
391130.2
411113 
Sheet
 
Upvote 0
Slight revision to the last formula to check that "3" is in the correct column, previously E19 = 3, F19 = 11, G19 = 9 (or similar variation) would incorrectly return 20%

=IF(G1=3*AND(SMALL(E1:F1,{1,2})={9,11}),0.2,"")
 
Upvote 0

Forum statistics

Threads
1,214,824
Messages
6,121,783
Members
449,049
Latest member
greyangel23

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