# IF Formula Assistance Required

#### garymu16

##### Board Regular
Can anyone advise me on where I am going wrong with the below forumla?

=if(J2>79,"80%",if(AND(J2<=79,J2>=50,"50/50",if(J2<50,"<50%",""))))

Basically I am trying to return 3 values based on the number in cell J2. If this number is 80 or more then return "80%". If the number in J2 is between 50 & 79 then return ""50/50" and if the value in J2 is less than 50 then return "<50".

Gary

### Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

#### brian.wethington

##### Well-known Member
Code:
``=IF(J2>79,"80%", IF(AND(J2<=79,J2>=50), "50/50", "<50%"))``
Try this

#### garymu16

##### Board Regular
Worked a treat - Thank you.

#### barry houdini

##### MrExcel MVP
You don't really need AND, this should suffice

=IF(J2>=80,"80%",IF(J2>=50,"50/50","<50%"))

#### Joe4

Actually, the AND clause is not even necessary (if it is greater than 79, it will never get to the second level, so it is redundant to test for it again):

=IF(J2>79,"80%", IF(J2>=50, "50/50", "<50%"))

#### brian.wethington

##### Well-known Member
Good point... I failed to remove that portion of the formula. just caught the missing end parenthesis and the fact that he did not need the last if statement. Thank you for picking up the slack.

Replies
5
Views
72
Replies
5
Views
147
Replies
15
Views
322
Replies
45
Views
1K
Replies
10
Views
215

1,181,647
Messages
5,931,209
Members
436,784
Latest member
amuljono

### 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.

### Which adblocker are you using?

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

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