Multiple criteria in one formul

Belinda Payroll

New Member
Joined
Oct 8, 2014
Messages
2
Hi,

I am trying to do the following:

IF D20 is less than zero, return D17
OR IF D20 is greater than zero, return value of D17 minus D20
OR IF D20 is greater than zero and D20 is greater than D17, return zero

This is the formula that I created: =+IF(D20<=0,D17,IF(D20>=0,D17-D20,IF(D20>=0,D20>D17,0)))

The 1st 2 criteria are working correctly but I cannot get the 3rd one to work. Can someone please help me.
Thanks Belinda.
 

Some videos you may like

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Try

=IF(D20<0,D17,IF(AND(D20>0,D20>D17),0,D17-D20))
 

Belinda Payroll

New Member
Joined
Oct 8, 2014
Messages
2
(SOLVED) Multiple criteria in one formul

Thank you. The formula you provided worked exactly as it should. This query is now resolved.
 

Watch MrExcel Video

Forum statistics

Threads
1,108,923
Messages
5,525,653
Members
409,658
Latest member
Yardcell

This Week's Hot Topics

Top