Need help to write formula in Excel

 We have two colun in my excel. 1. Amt1 , Amt2 and i need to come up with "Output calculate column with following criteria.

if “Amt1” is 1.50 or less and “Amt2” is 2:00 or less, “Output” is “Yes.”
If “Amt1” is 1.50 or less and “Amt2” is greater than 2:00, “Output” is “No.”
If “Amt1” is greater than 1.50 and “Amt2” is 4:00 or less, “Output” is “Yes.”
If “Amt1” is greater than 1.50 and “Amt2” is greater than 4:00, “Output” is “No.”

Can you please help?
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.


If Amt1 is in Column A, and Amt2 is in column B, then you could try something like this:


Adjust the column letters and row numbers to suit your actual data.

Ryan ChongSoftware Team LeadCommented:
I would use Alan's formula and revised to this instead:


Open in new window

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Amt2 column contains number or a time value?

If Amt2 is number...

Open in new window

If Amt2 is time...

Open in new window

Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

Rob HensonFinance AnalystCommented:
Your Amt1 doesn't seem to have any impact on the result, only the Amt2 changes the result.

      02:00      04:00
1.5      Yes            No
10      Yes            No

So you only need to test the value of Amt2:

sharepoint0520Author Commented:
Thank you all for quick support. I apologies for requirement change. The amt2 is the calculate  hour column from Start Date and End Date. Can you please help me to write one formula to accomplish this?

Thank you.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
Try this...

In F2

Open in new window

OR using table structured reference...
In F2

Open in new window

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
sharepoint0520Author Commented:
Thank you Neeraj and Thank you all for your help.
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome!
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 Excel

From novice to tech pro — start learning today.