I still can't get this formula right(IF/AND/OR)

Phoebe8178

New Member
Joined
Sep 22, 2002
Messages
17
This is the formula that I have written in my cell, but it won't accept it. =IF(OR(AND(A4<=50000,d4<3),0.25,AND(a4<=50000,d4>3),0.0625,AND(a4>50000,a4<=300000,d4<3),0.25,AND(a4>50000,a4<=300000,d4>3),0.0625,AND(a4>300000,d4<3),0.4375,AND(a4>300000,d4>3),0.25))
I'm comparing compensation amounts with years of service and the percentage that is associated with it. I am just starting to learn all of these functions and I am getting very confused. It's probably a simple error, but I can not figure it out for the life of me. Thank you!!!!!
This message was edited by Phoebe8178 on 2002-10-08 10:28
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

skipmartin

New Member
Joined
Jun 27, 2002
Messages
4
I don't think you need the OR statement

=IF(AND(A4<=50000,D4<3),0.25,IF(AND(A4<=50000,D4>3),0.0625,IF(AND(A4>50000,A4<=300000,D4<3),0.25,IF(AND(A4>50000,A4<=300000,D4>3),0.0625,IF(AND(A4>300000,D4<3),0.4375,IF(AND(A4>300000,D4>3),0.25))))))
 

Dave Patton

Well-known Member
Joined
Feb 15, 2002
Messages
4,971
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
On 2002-10-08 10:25, Phoebe8178 wrote:
This is the formula that I have written in my cell, but it won't accept it. =IF(OR(AND(A4<=50000,d4<3),0.25,AND(a4<=50000,d4>3),0.0625,AND(a4>50000,a4<=300000,d4<3),0.25,AND(a4>50000,a4<=300000,d4>3),0.0625,AND(a4>300000,d4<3),0.4375,AND(a4>300000,d4>3),0.25))
I'm comparing compensation amounts with years of service and the percentage that is associated with it. I am just starting to learn all of these functions and I am getting very confused. It's probably a simple error, but I can not figure it out for the life of me. Thank you!!!!!
This message was edited by Phoebe8178 on 2002-10-08 10:28

Consider something like

=IF(OR(AND(A4<=50000,D4<3),AND(A4>50000,A4<=300000,D4<3),AND(A4>300000,D4>3)),0.25,IF(OR(AND(A4<=50000,D4>3),AND(A4>50000,A4<=300000,D4>3)),0.0625,IF(AND(A4>300000,D4<3),0.4375,"")))

I did not check the logic or reasonableness of the formula.

1. You should check the validity of each section of the formula.
2. What if D4 =3?
This message was edited by Dave Patton on 2002-10-08 11:03
 

Phoebe8178

New Member
Joined
Sep 22, 2002
Messages
17
Another great suggestion, I will try both and again---THANK YOU SOOOOO MUCH!!!! These formulas can be so frustrating sometimes!
 

Forum statistics

Threads
1,144,330
Messages
5,723,740
Members
422,512
Latest member
MHau5

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
Top