Avatar of Ian Bell
Ian Bell
Flag for United Kingdom of Great Britain and Northern Ireland asked on

IF OR AND function

Hi
I would like help with placing brackets in right place and any other help on the below formula.
Example  ....... COL D contains numbers 1-12 and only numbers = 2,3 and 5 are of interest,
IF(OR(AND(D2=2,D2=3,D2=5),E2=1,F2=4,G2=5),99,0)
sample
                      D2 value = 2     E2 value = 1    F2 value = 4    G2  value = 5      returned value  = 99  all conditions fulfilled
                      D2 value = 1     E2 value = 1    F2 value = 4    G2  value = 5      returned value  = 0
                      D2 value = 2     E2 value = 4    F2 value = 4    G2  value = 5      returned value  = 0
                      D2 value = 3     E2 value = 1    F2 value = 4    G2  value = 5      returned value  = 99  all conditions fulfilled

Please help by modifying formula
Thanks
Ian
Microsoft ExcelMicrosoft Office

Avatar of undefined
Last Comment
Ian Bell

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
aikimark

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Qlemo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ian Bell

ASKER
Thanks guys you were quick.
Works perfectly
Ian Bell

ASKER
It's worked perfectly at my end.
I ran it over 72,000 rows and carried out an independent check and it all matched.
Thanks
Qlemo

Sorry.
aikimark changed his comment several times while I was looking at it (but not having posted yet), and I had the original comment in view only.
The comment as posted works. Whether you prefer his or my formula is up to you - please reassign points as you see fit.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
Ian Bell

ASKER
I wasn't aware of that. When I first accessed to see replies Aikimark's answer was complete.
I awarded the points based on his being first on list. However due to your latest post it probably is fair to award points equally. Assuming of course Aikimark has no objection.

Thanks again chaps

Ian
aikimark

No objection.  I thought I had made my change quick enough.  I guess that was a bad assumption on my part.  Sorry for the confusion.
Ian Bell

ASKER
I can now sleep peacefully :)   thanks A
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.