'If' 'and' statement

I need to check the values of a number of cells and keeping getting errors. D39 is a 'list cell' to control entries

1st check
=IF(D37="No", And(D39="Sea"or"Country")"text1=iftrue","text2=iffalse")

if I then change cell D37 to 'Yes' then
=IF(D37="Yes", And(D39="Sea"or"Country")"text3=iftrue","text4=iffalse")

Thanks in advance Paul
vipamanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

als315Commented:
Can you upload sample and show expectd result?
ShumsExcel & VBA ExpertCommented:
I am not sure, where is your Text1, Text2, Text3 or Text4 are:
Try below:
=IF(AND(D37="No",OR(D39="Sea",D39="Country")),"True","False")

Open in new window

vipamanAuthor Commented:
See attached file. Cell D41 ( titled - Determination of Peak Velocity Pressure) is what I am trying to populate with the output.
scaffoldv3.xlsx
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

ShumsExcel & VBA ExpertCommented:
Paul,

Check attached, above formula in your sample workbook.
scaffoldv3.xlsx
vipamanAuthor Commented:
Shums, logic is nearly there. I'll try and explain. When cell D37 = No and D39 = Sea or Country them D41= equation 1 if false then = equation 2.
If D37 = Yes and D39 = Town then D41 = equation 3  

Hope that makes sense?
ShumsExcel & VBA ExpertCommented:
Hi Paul,

Where is equation? I mean in which cells?
NorieAnalyst Assistant Commented:
Perhaps this is what you want.

=IF(D37="No", IF(OR(D39="Sea", D39="Country"), equation1, equation2),IF(D39="Town", equation3))

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vipamanAuthor Commented:
I want the calc to be done in cell D41. Just got to deal with daughter for an hour.
ShumsExcel & VBA ExpertCommented:
Try below:
=IF(AND(D37="Yes",D39="Town"),"Equation3",IF(AND(D37="No",OR(D39="Sea",D39="Country")),"Equation1","Equation2"))

Open in new window

scaffoldv3.xlsx
vipamanAuthor Commented:
Excellent thanks chaps
ShumsExcel & VBA ExpertCommented:
Paul,

If any of our solution served your purpose, I would request you to please close the question.

Regards,
vipamanAuthor Commented:
A concise answer
ShumsExcel & VBA ExpertCommented:
Try changing D37 as Yes and D39 as Sea or Country, Accepted answer will result as "FALSE".
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.