Formula needed ( conditional If statement)

ATester

New Member
Joined
May 30, 2014
Messages
17
Hi. I would like to create a calculated column which looks at the values in one column and returns the values in another column based on a formula.

So, for example if the value in cell a<0 then return "Excellent" , if the value is cell a >0 but less than 5 then return "Good", if the value in cell a is >5 then return "poor".

=if([ColumnName]<0,0);([ColumnName]>1,1) ;([ColumnName]>5,3); ([ColumnName]>10,4)
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Result should also be 0 (which is Excellent).
Either of these should work although I created a bound of -5 for Excellent.

=LOOKUP(A1, {-5,"Excellent";0,"Good";5,"Poor"})
=LOOKUP(A1, {-5,0,5},{"Excellent","Good","Poor"})
 
Upvote 0
Either of these should work although I created a bound of -5 for Excellent.

=LOOKUP(A1, {-5,"Excellent";0,"Good";5,"Poor"})
=LOOKUP(A1, {-5,0,5},{"Excellent","Good","Poor"})


Actually the LOOKUP formula is not available in BI. All I can see is LOOKUPVALUE
 
Upvote 0
I really need to talk to the mods about taking this forum off "search for unanswered questions". The well meaning folks just waste their time :(

OP, for a calc column, something like these "nested" if's... typically.

=if([ColumnName] <= 0, "Excellent", if([ColumnName] < 5, "Good", "Poor"))
 
Upvote 0
I really need to talk to the mods about taking this forum off "search for unanswered questions". The well meaning folks just waste their time :(

OP, for a calc column, something like these "nested" if's... typically.

=if([ColumnName] <= 0, "Excellent", if([ColumnName] < 5, "Good", "Poor"))

This worked thanks!
:)
 
Upvote 0
I really need to talk to the mods about taking this forum off "search for unanswered questions". The well meaning folks just waste their time :(

OP, for a calc column, something like these "nested" if's... typically.

=if([ColumnName] <= 0, "Excellent", if([ColumnName] < 5, "Good", "Poor"))

That's great.

What if I complicate things further and need to get the results of the if statement to be "Y" or "N" from two different tables. So that if both conditions are true, flag yes otherwise flag no.

= if (([ColumnNameA] = "A") and If ([ColumnNameB] = 2013), "Y", "N")
 
Upvote 0

Forum statistics

Threads
1,214,601
Messages
6,120,467
Members
448,965
Latest member
grijken

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
Back
Top